Error in script? - 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: Error in script? (
/showthread.php?tid=263816)
Error in script? -
Postalityjr - 23.06.2011
I set my killstreak to give a Death machine on 11 Kills. But it keeps giving it to me in 6 kills. But nowhere in my script does it say to give it in 6 kills.
Код:
CMD:deathmachine(playerid,params[])
{
if(GetPVarInt(playerid,"KillStreak") >= 11)
{
GivePlayerWeapon(playerid,38,250);
SetPVarInt(playerid,"KillStreak",0);
return 1;
}
if(GetPVarInt(playerid,"KillStreak") <= 10)
{
GameTextForPlayer(playerid,"~r~You Don't have a Death Machine",5000,3);
}
return 1;
}
Re: Error in script? -
Tee - 23.06.2011
Eh, I can't understand you.
Re: Error in script? -
LZLo - 23.06.2011
PHP код:
CMD:deathmachine(playerid,params[])
{
if(GetPVarInt(playerid,"KillStreak") >= 11)
{
GivePlayerWeapon(playerid,38,250);
SetPVarInt(playerid,"KillStreak",0);
//return 1;
}
else
if(GetPVarInt(playerid,"KillStreak") <= 10)
{
GameTextForPlayer(playerid,"~r~You Don't have a Death Machine",5000,3);
}
return 1;
}
and after onplayerdeath (if you need this)
PHP код:
SetPVarInt(playerid, "KillStreak", 0);
try this
Re: Error in script? -
Postalityjr - 23.06.2011
Quote:
Originally Posted by LZLo
PHP код:
CMD:deathmachine(playerid,params[])
{
if(GetPVarInt(playerid,"KillStreak") >= 11)
{
GivePlayerWeapon(playerid,38,250);
SetPVarInt(playerid,"KillStreak",0);
//return 1;
}
else
if(GetPVarInt(playerid,"KillStreak") <= 10)
{
GameTextForPlayer(playerid,"~r~You Don't have a Death Machine",5000,3);
}
return 1;
}
and after onplayerdeath (if you need this)
PHP код:
SetPVarInt(playerid, "KillStreak", 0);
try this
|
Thanks. it works like a charm now
.