cmd + string
#1

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;
Reply
#2

Код:
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 }
Reply
#3

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 }
Reply
#4

Takes a suicide?
Reply
#5

It's new at McDonalds
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)