SA-MP Forums Archive
/pm problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /pm problem (/showthread.php?tid=571388)



/pm problem - aCloudy - 18.04.2015

Hello, I have scripted /pm.
I type /pm [id..] heeeeeeeeeeeeeeeeyyy.....1915919591
But, It sends: heeeeeeeeeeeeeeeeyyy...

Can someone tell me the problem please?:

Код:
CMD:pm(playerid, params[])
{
	new ID, string[300], str[128];
	if(sscanf(params, "us", ID, str)) return SCM(playerid, COLOR_WHITE, ""WORD_USAGE"/pm [PLAYER_ID] [MESSAGE]");
	if(!IsPlayerConnected(ID)) return SCM(playerid, COLOR_WHITE, ""WORD_ERROR"This player is not connected.");
	
	format(string, sizeof(string), ""COL_YELLOW"[MESSAGE]{FFFFFF} To %s(%d): {C4C4C4}%s", PlayerName(ID), ID, str);
	SCM(playerid, COLOR_WHITE, string);
	format(string, sizeof(string), ""COL_YELLOW"[MESSAGE]{FFFFFF} From %s(%d): {C4C4C4}%s", PlayerName(playerid), playerid, str);
	SCM(ID, COLOR_WHITE, string);
	return 1;
}



Re: /pm problem - 036 - 18.04.2015

Код:
CMD:pm(playerid, params[])
{
	new ID, string[300], str[600];
	if(sscanf(params, "us", ID, str)) return SCM(playerid, COLOR_WHITE, ""WORD_USAGE"/pm [PLAYER_ID] [MESSAGE]");
	if(!IsPlayerConnected(ID)) return SCM(playerid, COLOR_WHITE, ""WORD_ERROR"This player is not connected.");
	
	format(string, sizeof(string), ""COL_YELLOW"[MESSAGE]{FFFFFF} To %s(%d): {C4C4C4}%s", PlayerName(ID), ID, str);
	SCM(playerid, COLOR_WHITE, string);
	format(string, sizeof(string), ""COL_YELLOW"[MESSAGE]{FFFFFF} From %s(%d): {C4C4C4}%s", PlayerName(playerid), playerid, str);
	SCM(ID, COLOR_WHITE, string);
	return 1;
}



Re: /pm problem - Azula - 18.04.2015

str[512];


Re: /pm problem - J4Rr3x - 18.04.2015

pawn Код:
CMD:pm(playerid, params[])
{
    new ID, string[128], str[256];
    if(sscanf(params, "us[256]", ID, str)) return SCM(playerid, COLOR_WHITE, ""WORD_USAGE"/pm [PLAYER_ID] [MESSAGE]");
    if(!IsPlayerConnected(ID) || playerid == id) return SCM(playerid, COLOR_WHITE, ""WORD_ERROR"Invalid player");
   
    format(string, sizeof(string), ""COL_YELLOW"[MESSAGE]{FFFFFF} To %s(%d): {C4C4C4}%s", PlayerName(ID), ID, str);
    SCM(playerid, COLOR_WHITE, string);
    format(string, sizeof(string), ""COL_YELLOW"[MESSAGE]{FFFFFF} From %s(%d): {C4C4C4}%s", PlayerName(playerid), playerid, str);
    SCM(ID, COLOR_WHITE, string);
    return 1;
}