16.07.2012, 15:17
pawn Код:
if(strcmp(cmd, "/getteam", true) == 0)
{
new tmp[256];
pid = strval(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,0xffffffff,"USAGE: /getteam [playerid]");
if(IsPlayerConnected(pid))
{
GetPlayerName(pid,sp,sizeof(sp));
format(str,128 char,"%s (ID:%d) team is: %s.",sp,pid,GetPlayergTeam(pid));
SendClientMessage(playerid,0xffffff00,str);
}
else return SendClientMessage(playerid,0xffffff00,"Warning: Player is not connected!");
return 1;
}