Help Please
#1

Hey people tried to do a check command but it did nothing to try it on another player shows my stats I need for an RP I'm doing
PHP код:
CMD:check(playerid, params[])
{
    new 
gamer;
    new 
atext[128];
    new 
atext2[128];
    new 
nivo = PlayerInfo[playerid][Hungry];
    new 
nivo2 = PlayerInfo[gamer][Hungry];
    if(!
IsPlayerAdmin(playerid))
        return 
SendClientMessage(playerid, COLOR_RED, "Достъп отказан.");
    if (
sscanf(params, "u", gamer)) SendClientMessage(playerid, COLOR_RED, "Използвай: \"/check <Играч>");
    else if (
gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Играча на е намерен");
    else
    {
        
format (atext, sizeof(atext), "Hungry on player:%d",nivo);
        
format (atext2, sizeof(atext2), "Hungry on player:%d",nivo2);
        
SendClientMessage(playerid, COLOR_PURPLE, atext2);
        
SendClientMessage(playerid, COLOR_PURPLE, atext);
    }
    return 
1;
} 
Reply


Forum Jump:


Users browsing this thread: