02.11.2014, 01:01
This code:
pawn Код:
public OnPlayerText(playerid, text[])
{
new findid=strfind(text,"id",true,0);
if(findid!=-1)
{
new msg[20],id,extra,pname[MAX_PLAYER_NAME];
strmid(msg,text,findid,findid+5);
if(sscanf(msg,"uu",extra,id))
{
return 1;
}
if(id==INVALID_PLAYER_ID)
{
return 1;
}
GetPlayerName(id,pname,sizeof(pname));
strdel(text,findid,findid+5);
strins(text,pname,findid,sizeof(pname));
SendClientMessageToAll(-1,text);
return 0;
}
return 1;
}