Looking for score system - 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: Looking for score system (
/showthread.php?tid=636680)
Looking for score system -
elhanan - 02.07.2017
hi its me again. im looking for score system, ive tried this
https://sampforum.blast.hk/showthread.php?tid=207768
but i got problems with it. i need a score system that every kill gives you 10 score.
1 score for hit someone and 5 score every hour free. i tried to build one. but i cant im getting only errors. can someone help me find this score system?
Re: Looking for score system -
JasonRiggs - 02.07.2017
Okay, about killing someone gives u 10 score, Make it Under
,
PHP код:
SetPlayerScore(killerid,GetPlayerScore(playerid)+10);
and 1 score on hitting someone, make it under
PHP код:
OnPlayerGiveDamage
PHP код:
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
for free 5 score each hour, make a timer using timestamp or something
Re: Looking for score system -
GoldenLion - 02.07.2017
https://sampwiki.blast.hk/wiki/SetPlayerScore (the example is what you are looking for)
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage (for hitting score)
https://sampwiki.blast.hk/wiki/SetTimer or
https://sampwiki.blast.hk/wiki/SetTimerEx (for hourly score)
Re: Looking for score system -
elhanan - 02.07.2017
there is server that using textdraw
and the score amount writen here like that
http://imgur.com/s2POJTK
how to do it?
Re: Looking for score system -
Freedom. - 02.07.2017
Here is example, add this(not public) to 1000 ms timer.
Код:
if(IsDivisible(ADD_NOW_TIME - ADD_JOINED_TIME, 600) && ADD_NOW_TIME - ADD_JOINED_TIME != 0) {
// Give Score
}
forward IsDivisible(the_number, divided_by);
public IsDivisible(the_number, divided_by)
{
while(the_number > 0) the_number -= divided_by;
if(!the_number) return 1;
return 0;
}
Re: Looking for score system -
elhanan - 02.07.2017
thanks guys you helping me a lot. but i want make the score system filterscript. will these codes will work there?