invalid player id
#2

pawn Код:
CMD:hownoob(playerid, params[])
{
    new pname[MAX_PLAYER_NAME];
    new noob = random(101);
    new string[64];
    new id; // the target
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, RED, "Invalid ID."); // You had IsPlayerConnected(playerid)
    if(sscanf(params, "us[64]", id, string)) return SendClientMessage(playerid, RED, "Syntax: /hownoob (id)"); // You had "us[128]" yet you defined string as 64, and you forgot to include string after ID

    // Change the rest of the stuff id = target, playerid = YOU
    if(GetPVarInt(playerid,"HOWNOOB_TIMER")>GetTickCount())return SendClientMessage(playerid,0xFFFFFFFF,"Please Wait Before Being Noob Again!");
    SetPVarInt(playerid,"HOWNOOB_TIMER",GetTickCount()+60000);
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "OMG! %s(%d) is %i Percent Noob!", pname, playerid, noob);
    SendClientMessageToAll(PINK, string);
    return 1;
}
Reply


Messages In This Thread
invalid player id - by tommzy09 - 16.08.2014, 07:31
Re: invalid player id - by Affan - 16.08.2014, 07:38
Re: invalid player id - by tommzy09 - 16.08.2014, 08:02
Re: invalid player id - by Affan - 16.08.2014, 08:08
Re: invalid player id - by tommzy09 - 16.08.2014, 08:21
Re: invalid player id - by Stinged - 16.08.2014, 08:21
Re: invalid player id - by DobbysGamertag - 16.08.2014, 08:25
Re: invalid player id - by tommzy09 - 16.08.2014, 08:29

Forum Jump:


Users browsing this thread: 1 Guest(s)