GivePlayerScore Bug - 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: GivePlayerScore Bug (
/showthread.php?tid=440752)
GivePlayerScore Bug -
Fitri - 31.05.2013
hello i created script after other player kill other player, player will get score but, after i do that, my script not loaded
pawn Код:
#include <a_samp>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" This Is Bug LOL");
print("--------------------------------------\n");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerScore(killerid,5);
GivePlayerScore(playerid,-2);
GivePlayerMoney(playerid,-200);
GivePlayerMoney(killerid,200);
return 1;
}
Код:
[13:11:24] Loading filterscript 'walao.amx'...
[13:11:24] Loaded 1 filterscripts.
after i delete
pawn Код:
GivePlayerScore(killerid,5);
GivePlayerScore(playerid,-2);
my fs loaded lol, help me :/
Re: GivePlayerScore Bug -
Guest123 - 31.05.2013
use this
i also have that bug, but i do this
pawn Код:
stock GivePlayerScores(playerid, amount)
{
new PlayerScore;
PlayerScore = GetPlayerScore(playerid);
SetPlayerScore(playerid,PlayerScore+amount);
return 1;
}
Re: GivePlayerScore Bug -
Fitri - 31.05.2013
how to use that :/
Re: GivePlayerScore Bug -
Guest123 - 31.05.2013
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerScores(killerid,5);
GivePlayerScores(playerid,-2);
GivePlayerMoney(playerid,-200);
GivePlayerMoney(killerid,200);
return 1;
}
put this anywhere
pawn Код:
stock GivePlayerScores(playerid, amount)
{
new PlayerScore;
PlayerScore = GetPlayerScore(playerid);
SetPlayerScore(playerid,PlayerScore+amount);
return 1;
}
Re: GivePlayerScore Bug -
Fitri - 31.05.2013
tnx alot for fast response and helped me !