Skripta koju koristim:NLRPG
Detaljan opis problema:a ovako el se moze kako napraviti da kad na mehanicar napise /duznost da se u chat napise
mehanicar &s je na duznosti
Dio skripte:
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2482.2783,-1464.7079,24.0168))
{
if(PI[playerid][Posao] != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
if(hMehDuznost[playerid] == 0)
{
if(PI[playerid][Pol] == 0)
{
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 50);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
else
{
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 298);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost[playerid] == 1)
{
hMehDuznost[playerid] = 0;
h_SetPlayerSkin(playerid, PI[playerid][Skin]);
SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
}
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2482.2783,-1464.7079,24.0168))
{
if(PI[playerid][Posao] != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
if(hMehDuznost[playerid] == 0) {
if(PI[playerid][Pol] == 0) {
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 50);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
new name[MAX_PLAYER_NAME+1],
string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Mehanicar %s je na duznosti.", name);
SendClientMessageToAll(PLAVA, string);
}
else {
new name[MAX_PLAYER_NAME+1],
string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Mehanicar %s je na duznosti.", name);
SendClientMessageToAll(PLAVA, string);
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 298);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost[playerid] == 1) {
hMehDuznost[playerid] = 0;
h_SetPlayerSkin(playerid, PI[playerid][Skin]);
SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
}
}
Grubo uradjeno, ti mozes malo da ga sredis i da se pobrines za velicine stringova.
Citat: Extreme a.k.a. Snooker poslato Jul 31, 2012, 12:54:13 POSLE PODNE
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2482.2783,-1464.7079,24.0168))
{
if(PI[playerid][Posao] != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
if(hMehDuznost[playerid] == 0) {
if(PI[playerid][Pol] == 0) {
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 50);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
new name[MAX_PLAYER_NAME+1],
string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Mehanicar %s je na duznosti.", name);
SendClientMessageToAll(PLAVA, string);
}
else {
new name[MAX_PLAYER_NAME+1],
string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Mehanicar %s je na duznosti.", name);
SendClientMessageToAll(PLAVA, string);
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 298);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost[playerid] == 1) {
hMehDuznost[playerid] = 0;
h_SetPlayerSkin(playerid, PI[playerid][Skin]);
SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
}
}
Grubo uradjeno, ti mozes malo da ga sredis i da se pobrines za velicine stringova.
fala fala
C:\Users\Buljan\Desktop\Northern Lights RPG Mod!\gamemodes\NLRPGv2.pwn(66067) : warning 217: loose indentation
C:\Users\Buljan\Desktop\Northern Lights RPG Mod!\gamemodes\NLRPGv2.pwn(75568) : error 017: undefined symbol "ime"
C:\Users\Buljan\Desktop\Northern Lights RPG Mod!\gamemodes\NLRPGv2.pwn(75569) : error 017: undefined symbol "ime"
C:\Users\Buljan\Desktop\Northern Lights RPG Mod!\gamemodes\NLRPGv2.pwn(75576) : error 017: undefined symbol "ime"
C:\Users\Buljan\Desktop\Northern Lights RPG Mod!\gamemodes\NLRPGv2.pwn(75577) : error 017: undefined symbol "ime"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
sta sad ???
TopGun ti nikad nisi skriptao, frankie evo ti zamjeni tu duznost sa ovim
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2482.2783,-1464.7079,24.0168))
{
if(PI[playerid][Posao] != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
if(hMehDuznost[playerid] == 0)
{
if(PI[playerid][Pol] == 0)
{
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 50);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
new hIme[MAX_PLAYER_NAME];
RPIme(playerid, hIme);
format(CmdString, sizeof CmdString, "Automehanicar %s je sada na duznosti | Da ga pozovete upisite /pozovi mehanicar", hIme);
SendClientMessageToAll(ZELENA2, CmdString);
}
else
{
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 298);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost[playerid] == 1)
{
hMehDuznost[playerid] = 0;
h_SetPlayerSkin(playerid, PI[playerid][Skin]);
SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
new hIme[MAX_PLAYER_NAME];
RPIme(playerid, hIme);
format(CmdString, sizeof CmdString, "Automehanicar %s nije vise na duznosti..", hIme);
SendClientMessageToAll(ZELENA2, CmdString);
}
}
Evo tvoja duznost je da meni popusis tuki MAJMUNE!
Ti si lud!
Citat: Vuzee01 poslato Jul 31, 2012, 17:00:04 POSLE PODNE
Evo tvoja duznost je da meni popusis tuki [cenzura]E!
ti si onaj voze sa PG-a :o
u jbt ja gori server vidio nisam
meni hakuje svaki put kad otvorim jer je ljubomoran sto njegov nema igraca
Citat: TopGun poslato Jul 31, 2012, 15:11:27 POSLE PODNE
umjesto ime stavi name
pokušaj tako
ovako
new ime:GetPlayerName;
oBJASNIO SAM mu ja i radi mu, jer je tako i meni, nema vise stra, ajavi se frankie reci jer radi ista
Citat: Black Boy poslato Jul 31, 2012, 15:38:24 POSLE PODNE
TopGun ti nikad nisi skriptao, frankie evo ti zamjeni tu duznost sa ovim
else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2482.2783,-1464.7079,24.0168))
{
if(PI[playerid][Posao] != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
if(hMehDuznost[playerid] == 0)
{
if(PI[playerid][Pol] == 0)
{
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 50);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
new hIme[MAX_PLAYER_NAME];
RPIme(playerid, hIme);
format(CmdString, sizeof CmdString, "Automehanicar %s je sada na duznosti | Da ga pozovete upisite /pozovi mehanicar", hIme);
SendClientMessageToAll(ZELENA2, CmdString);
}
else
{
hMehDuznost[playerid] = 1;
h_SetPlayerSkin(playerid, 298);
SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost[playerid] == 1)
{
hMehDuznost[playerid] = 0;
h_SetPlayerSkin(playerid, PI[playerid][Skin]);
SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
new hIme[MAX_PLAYER_NAME];
RPIme(playerid, hIme);
format(CmdString, sizeof CmdString, "Automehanicar %s nije vise na duznosti..", hIme);
SendClientMessageToAll(ZELENA2, CmdString);
}
}
e black boy
fala ti puno
moze lock