03.06.2012, 06:06
Quote:
CMDm(playerid,params[]) { new PID; new message; if(sscanf(params, "us[32]", message)) { return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /pm <playerid> <message>"); } if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player is not connected!"); new pmsg[256]; new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); format(pmsg,sizeof(pmsg),"PM from %s(%d): %s",pname,playerid,message); new pidmsg[256]; new pidname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pidname,sizeof(pidname)); format(pidmsg,sizeof(pidmsg),"PM to %s(%d): %s",pidname,PID,message); SendClientMessage(PID, 0xFFFF00AA, pmsg); SendClientMessage(playerid, 0xFFFF00AA, pidmsg); return 1; } |