23.10.2012, 21:55
PHP код:
CMD:pm(playerid,params[])
{
new target,tName[MAX_PLAYER_NAME],message[100],pName[MAX_PLAYER_NAME],string[124];
if(sscanf(params,"us[100]",target,message)) return SendClientMessage(playerid,-1,"Error:/pm [playerid] [message]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"ERROR:Player not connected");
GetPlayerName(target,tName,sizeof(tName));
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"PM From %s - %s");
GameTextForPlayer(target,string,10000,0);
return 1;
}