[pomoc] Duznost

Započeo Dodo_Shadow
pre 13 godina
830
pregleda
11
postova
Dominik_Frankie
Enforcer
pre 13 godina
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 != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
    if(hMehDuznost == 0)
    {
        if(PI == 0)
        {
    hMehDuznost = 1;
    h_SetPlayerSkin(playerid, 50);
    SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
else
{
    hMehDuznost = 1;
    h_SetPlayerSkin(playerid, 298);
    SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost == 1)
{
    hMehDuznost = 0;
    h_SetPlayerSkin(playerid, PI);
    SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
pavle.bakun
Crime Lord
pre 13 godina

else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2482.2783,-1464.7079,24.0168))
{
    if(PI != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
    if(hMehDuznost == 0) {
        if(PI == 0) {
            hMehDuznost = 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 = 1;
            h_SetPlayerSkin(playerid, 298);
            SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
        }
    }
    else if(hMehDuznost == 1) {
        hMehDuznost = 0;
        h_SetPlayerSkin(playerid, PI);
        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.
Dominik_Frankie
Enforcer
pre 13 godina
Extreme a.k.a. Snooker wrote on July 31, 2012, 10:54 am:

else if(IsPlayerInRangeOfPoint(playerid, 3.0, 2482.2783,-1464.7079,24.0168))
{
    if(PI != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
    if(hMehDuznost == 0) {
        if(PI == 0) {
            hMehDuznost = 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 = 1;
            h_SetPlayerSkin(playerid, 298);
            SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
        }
    }
    else if(hMehDuznost == 1) {
        hMehDuznost = 0;
        h_SetPlayerSkin(playerid, PI);
        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
Dominik_Frankie
Enforcer
pre 13 godina
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 😕
Obrisan korisnik Obrisan korisnik
pre 13 godina
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 != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
    if(hMehDuznost == 0)
    {
        if(PI == 0)
        {
    hMehDuznost = 1;
    h_SetPlayerSkin(playerid, 50);
    SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
        new hIme;
            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 = 1;
    h_SetPlayerSkin(playerid, 298);
    SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost == 1)
{
    hMehDuznost = 0;
    h_SetPlayerSkin(playerid, PI);
    SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
    new hIme;
            RPIme(playerid, hIme);
    format(CmdString, sizeof CmdString, "Automehanicar %s  nije vise na duznosti..", hIme);
            SendClientMessageToAll(ZELENA2, CmdString);
}
}
Vuzee01
Street Runner
pre 13 godina
Evo tvoja duznost je da meni popusis tuki MAJMUNE!
Obrisan korisnik Obrisan korisnik
pre 13 godina
Ti si lud!
Dominik_Frankie
Enforcer
pre 13 godina
Vuzee01 wrote on July 31, 2012, 3:00 pm:
Evo tvoja duznost je da meni popusis tuki E!

ti si onaj voze sa PG-a 😮
u jbt ja gori server vidio nisam
meni hakuje svaki put kad otvorim jer je ljubomoran sto njegov nema igraca
Don Eagle
Made Man
pre 13 godina
TopGun wrote on July 31, 2012, 1:11 pm:
umjesto ime stavi name

pokušaj tako


ovako
new ime:GetPlayerName;
Obrisan korisnik Obrisan korisnik
pre 13 godina
oBJASNIO SAM mu ja i radi mu, jer je tako i meni, nema vise stra, ajavi se frankie reci jer radi ista
Dominik_Frankie
Enforcer
pre 13 godina
Black Boy wrote on July 31, 2012, 1:38 pm:
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 != POSAO_MEHANICAR) return SCM(playerid, GRAD2, "(greska) Niste zaposleni kao mehanicar!");
    if(hMehDuznost == 0)
    {
        if(PI == 0)
        {
    hMehDuznost = 1;
    h_SetPlayerSkin(playerid, 50);
    SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
        new hIme;
            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 = 1;
    h_SetPlayerSkin(playerid, 298);
    SCM(playerid, PLAVA, "Obukli ste mehanicarsko odelo i uzeli duznost. Sada mozete primati pozive igraca.");
}
}
else if(hMehDuznost == 1)
{
    hMehDuznost = 0;
    h_SetPlayerSkin(playerid, PI);
    SCM(playerid, PLAVA, "Svukli ste mehanicarsko odelo, niste vise na duznosti.");
    new hIme;
            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

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava