[Help] Pm Script
#2

Код:
CMD:pm(playerid,params[])
{
    new id;
	new string[256];
	new pName[MAX_PLAYER_NAME];
	new pName2[MAX_PLAYER_NAME];
	if(sscanf(params,"us[128]",id)) return SendClientMessage(playerid,COLOR_YELLOW,"Correct Usage:/pm [ID] [Text]");
	if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player ID Doesn't Exist");
	{
	    GetPlayerName(playerid,pName,sizeof(pName));
        GetPlayerName(id,pName2,sizeof(pName2));
        format(string,sizeof(string),"Private Message Recived From: [%s]: %s",pName,params);
        GameTextForPlayer(playerid, "~w~Private Message ~g~Sent",3500,5);
        GameTextForPlayer(id, "~w~Private Message ~g~Recived",3500,5);
        SendClientMessage(id,COLOR_YELLOW,string);
        format(string,sizeof(string),"Private Message Sent To: [%s]: %s",pName2,params);
        SendClientMessage(playerid,COLOR_YELLOW,string);
        format(string,sizeof(string),"%s wrote a private message to: %s! Text: %s ",pName,pName2,params);
    	SaveIn("PMLog.txt",string);
 	}
	return 1;
}
Here we go
Reply


Messages In This Thread
[Help] Pm Script - by Monster[HD] - 13.04.2011, 15:00
Re: [Help] Pm Script - by BASITJALIL - 13.04.2011, 15:03
Re: [Help] Pm Script - by Rivera - 13.04.2011, 15:13

Forum Jump:


Users browsing this thread: 4 Guest(s)