SA-MP Forums Archive
cmd + string - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: cmd + string (/showthread.php?tid=66422)



cmd + string - KnooL - 21.02.2009

Hello all,

I've seen a gamemode on sa-mp 0.2x where anims are executed with /me strings.
Like if u smoke it shows up lights up a cig and smokes it

Can someone help me out with /kill ? Cause it won't show up.
Код:
//-------------------------------[Kill]-------------------------------------------------------------------------
	new suicider[MAX_PLAYER_NAME];
	if(strcmp(cmd, "/kill", true) == 0)
	{
		GetPlayerName(playerid, suicider, sizeof(suicider));
		SetPlayerHealth(playerid,0.0);
		format(string, sizeof(string), "* %s takes out a knife from jacket, and takes a suicide.", suicider);
		SendClientMessageToAll(COLOR_RED, string);
		return 1;



Re: cmd + string - Flo_White - 21.02.2009

Код:
new suicider[MAX_PLAYER_NAME];
	if(strcmp(cmd, "/kill", true) == 0)
	{
       new string[128];
		GetPlayerName(playerid, suicider, sizeof(suicider));
		SetPlayerHealth(playerid,0.0);
		format(string, sizeof(string), "* %s takes out a knife from jacket, and takes a suicide.", suicider);
		SendClientMessageToAll(COLOR_RED, string);
		return 1;
}
you forgot the new string[128]; and a }


Re: cmd + string - x-cutter - 22.02.2009

Quote:
Originally Posted by Flo_White
Код:
new suicider[MAX_PLAYER_NAME];
	if(strcmp(cmd, "/kill", true) == 0)
	{
       new string[128];
		GetPlayerName(playerid, suicider, sizeof(suicider));
		SetPlayerHealth(playerid,0.0);
		format(string, sizeof(string), "* %s takes out a knife from jacket, and takes a suicide.", suicider);
		SendClientMessageToAll(COLOR_RED, string);
		return 1;
}
You also might want to make the text local using a loop and GetDistanceBetweenPlayers()

you forgot the new string[128]; and a }



Re: cmd + string - Mikep - 22.02.2009

Takes a suicide?


Re: cmd + string - [RP]Rav - 22.02.2009

It's new at McDonalds


Re: cmd + string - KnooL - 22.02.2009

Quote:
Originally Posted by Mikep
Takes a suicide?
Well, i was working on it at night.

Tired, searching for an solution. Thanks for your help!

** EDIT **

It aint giving me any text.
using: penls