Need Help please
#1

CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, -1, "You Have commited a Suicide");
PlayerDeaths[playerid]
return true;
}

error 017: undefined symbol "PlayerDeaths"

i want if some one use /kill = 1 deaths
thanks for help
Reply
#2

The variable should be declared before using it
use
PHP код:
new PlayerDeaths[MAX_PLAYERS];//global 
PHP код:
CMD:kill(playeridparams[])
{
SetPlayerHealth(playerid0.0);
SendClientMessage(playerid, -1"You Have commited a Suicide");
PlayerDeaths[playerid]++;
return 
true;

Reply
#3

still death not count -,-
Reply
#4

And where are you checking your deaths exactly?
Reply
#5

You meant That you want to See the Death Log?
Reply
#6

example , if i use /kill
my stats = death : 1
Reply
#7

Код:
CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, -1, "You Have commited a Suicide");
PlayerInfo[playerid][PlayerDeaths]++; //Change to fit your script.
return true;
}
Are you using an enumerator? If so, use the one above and change it to fit your script.
Reply
#8

If not, try this
PHP код:
new PlayerDeaths[MAX_PLAYERS] = 0
PHP код:
CMD:kill(playeridparams[])
{
SetPlayerHealth(playerid0.0);
SendClientMessage(playerid, -1"You Have commited a Suicide");
PlayerDeaths[playerid]++;
return 
true;

I'm not really good at these. Just trying my best to help
Reply
#9

i'm appreciated you bro
sorry for my bad english :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)