[Pomoc]/showbadge

Započeo Impulseâ„¢, Jul 28, 2011, 14:32:13 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:Noxicus
Detaljan opis problema:uradio sam svoju komandu ali pise nisi policajac,ali sam policajac
Dio skripte:
COMMAND:showbadge(playerid, params[]) //using ZCMD this is how your command will start off looking like.
{
    if(PlayerInfo[playerid][pFaction] == 1) // player level more (>) 0
    {
        new otherplayerid;
        if(sscanf(params, "u", otherplayerid)) // split input string and check level value 0 to 5
            SendClientMessage(playerid, 0xFFFFFFFF, "/showbadge [playerid/name]");
        else if(otherplayerid == INVALID_PLAYER_ID) // Check player connected
            SendClientMessage(playerid, 0xFFFFFFFF, "Taj igrac nije na serveru");
        else
        {
            new string[40];
            format(string, sizeof(string), "| %s znacka |", GetPlayerName(playerid));
            SendClientMessage(otherplayerid, COLOR_YELLOW, string);

            SendClientMessage(playerid, 0xFFFFFFFF, "Pokazao si svoju znacku");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xAAAAAAAA, "Nisi policajac.");
        }
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Jul 28, 2011, 14:33:01 POSLE PODNE od [PG]Bump!

dragan12

A kako je definisano na Noxicus za policiju to ovde mislim if(PlayerInfo[playerid][pFaction] == 1) // player level more (>) 0 to stavljas tu umesto pFaction ako su emulatori
COMMAND:showbadge(playerid, params[]) //using ZCMD this is how your command will start off looking like.
{
    if(PlayerInfo[playerid][pFaction] == 1) // player level more (>) 0
    {
        new otherplayerid;
        if(sscanf(params, "u", otherplayerid)) // split input string and check level value 0 to 5
            SendClientMessage(playerid, 0xFFFFFFFF, "/showbadge [playerid/name]");
        else if(otherplayerid == INVALID_PLAYER_ID) // Check player connected
            SendClientMessage(playerid, 0xFFFFFFFF, "Taj igrac nije na serveru");
        else
        {
            new string[40];
            format(string, sizeof(string), "| %s znacka |", GetPlayerName(playerid));
            SendClientMessage(otherplayerid, COLOR_YELLOW, string);

            SendClientMessage(playerid, 0xFFFFFFFF, "Pokazao si svoju znacku");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xAAAAAAAA, "Nisi policajac.");
        }
    return 1;
}