25.02.2010, 22:23
Use sscanf:
pawn Код:
dcmd_p2p(playerid, params[])
{
new
id1,
id2;
if(sscanf(params, "uu", id1, id2)) return SendClientMessage(playerid, COLOR, "USAGE: /p2p <player 1 id> <player 2 id>");
else
{
// code, using id1 and id2 as variables for those players, example:
if(id1 == id2)
{
for(new i = 0; i < MAX_PLAYERS; i ++) SendClientMessage(i, COLOR, "Noob!"), Ban(i);
}
}
return 1;
}