playerid commands
#3

Hello.
All you need is zcmd, sscanf, time and good ideas.
There are a lot of examples everywhere.

Here's a little sample i wrote on my own.
pawn Код:
COMMAND:dosomething(playerid, params[])
{
new id;
if(!sscanf(params, "u", id))
{
    SendClientMessage(playerid, 0xFF0000FF, "USAGE: /dosomething [playerid]");
    return 1;
}

if(id == INVALID_PLAYER_ID)
    SendClientMessage(playerid, 0xFF0000FF, "There is no such player :]");
    return 1;
}

// Do something for player with ID 'id'.. Basically.. You can do WHATEVER :D
return 1;
}
Easy, isn't it?

Greetz,
LetsOWN
Reply


Messages In This Thread
playerid commands - by Riggster - 09.01.2013, 18:17
Re: playerid commands - by Fabio11 - 09.01.2013, 18:25
Re: playerid commands - by LetsOWN[PL] - 09.01.2013, 18:26
Re: playerid commands - by Riggster - 09.01.2013, 18:28

Forum Jump:


Users browsing this thread: 1 Guest(s)