SA-MP Forums Archive
pm help needed - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: pm help needed (/showthread.php?tid=387094)



pm help needed - ashwinsekhari - 23.10.2012

can someone help me i need a pm script which sends a pm to a player and a 3d text is recieved by a player taht "pm recieved" and to the sender a 3d text is again recieved by the plyer "pm sent"


Re: pm help needed - Anthony © - 23.10.2012

Код:
CMD:pm(playerid, params[])
{
	new pmID, pmMSG[64], stringsnd[128], stringfrm[128];
	if(sscanf(params, "us[64]", pmID, pmMSG)) return SendClientMessage(playerid, COLOR_SYNTAX, "[Syntax]: /pm [playerid] [message]");
	if(pmID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[Error]: Invalid playerid.");
	{
		if(PlayerInfo[playerid][pAduty] == 1)
		{
			format(stringfrm, sizeof(stringfrm), "(( PM from {F78009}%s{F2DB0D} (%i): %s ))", GetName(playerid), playerid, pmMSG);
			SendClientMessage(pmID, COLOR_PM, stringfrm);
			format(stringsnd, sizeof(stringsnd), "(( PM sent to %s (%i): %s ))", GetName(pmID), pmID, pmMSG);
			SendClientMessage(playerid, COLOR_PM, stringsnd);
		}
		else
		{
			format(stringfrm, sizeof(stringfrm), "(( PM from %s (%i): %s ))", GetName(playerid), playerid, pmMSG);
			SendClientMessage(pmID, COLOR_PM, stringfrm);
			format(stringsnd, sizeof(stringsnd), "(( PM sent to %s (%i): %s ))", GetName(pmID), pmID, pmMSG);
			SendClientMessage(playerid, COLOR_PM, stringsnd);
		}
		
		
	}
		
	return 1;
}
This worked last time I checked, just add the 3d text wherever you see it necessary


Re: pm help needed - ashwinsekhari - 23.10.2012

idk how to add 3d text


Re: pm help needed - Lordzy - 23.10.2012

Quote:
Originally Posted by ashwinsekhari
Посмотреть сообщение
can someone help me i need a pm script which sends a pm to a player and a 3d text is recieved by a player taht "pm recieved" and to the sender a 3d text is again recieved by the plyer "pm sent"
If I'm not wrong, did you mean 3dtext as this?



Re: pm help needed - doreto - 23.10.2012

https://sampforum.blast.hk/showthread.php?tid=187229


Re: pm help needed - ashwinsekhari - 23.10.2012

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
If I'm not wrong, did you mean 3dtext as this?
yes ur write i need like this

like that which young generation's is using


Re: pm help needed - GangsterLifeRP - 23.10.2012

it should be in the script allready just to /cnnn if its an RP Server and there you have it mate


Re: pm help needed - DaizeN - 23.10.2012

Quote:
Originally Posted by GangsterLifeRP
Посмотреть сообщение
it should be in the script allready just to /cnnn if its an RP Server and there you have it mate
Really? Many roleplay servers have /cnn dosent mean that each invindual script have it. I also suggest read above, he wanted it to appear on players screen after they sent an privat message.


Re: pm help needed - tyler12 - 23.10.2012

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;




Re: pm help needed - ashwinsekhari - 24.10.2012

like if you sent a pm it says like this look in the pic



and when u recieve it says like this