19.03.2012, 10:35
How can i make this
ZCMD? Please convert
PHP код:
if(strcmp(cmd, "/id", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /id [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerNameEx(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Name: %s, ID: %d", giveplayer, giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
else
{
format(string, sizeof(string), " %d is not an active player !", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}