Need Help please - 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: Need Help please (
/showthread.php?tid=620483)
Need Help please -
kevin132312 - 30.10.2016
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
Re: Need Help please -
SyS - 30.10.2016
The variable should be declared before using it
use
PHP код:
new PlayerDeaths[MAX_PLAYERS];//global
PHP код:
CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid, -1, "You Have commited a Suicide");
PlayerDeaths[playerid]++;
return true;
}
Re: Need Help please -
kevin132312 - 30.10.2016
still death not count -,-
Re: Need Help please -
Hansrutger - 30.10.2016
And where are you checking your deaths exactly?
Re: Need Help please -
RyderX - 30.10.2016
You meant That you want to See the Death Log?
Re: Need Help please -
kevin132312 - 31.10.2016
example , if i use /kill
my stats = death : 1
Re: Need Help please -
NealPeteros - 31.10.2016
Код:
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.
Re: Need Help please -
NealPeteros - 31.10.2016
If not, try this
PHP код:
new PlayerDeaths[MAX_PLAYERS] = 0;
PHP код:
CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0.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
Re: Need Help please -
kevin132312 - 31.10.2016
i'm appreciated you bro
sorry for my bad english :P