Looking for score system
#1

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?
Reply
#2

Okay, about killing someone gives u 10 score, Make it Under
PHP код:
OnPlayerDeath 
,
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
Reply
#3

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)
Reply
#4

there is server that using textdraw
and the score amount writen here like that
http://imgur.com/s2POJTK
how to do it?
Reply
#5

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;
}
Reply
#6

thanks guys you helping me a lot. but i want make the score system filterscript. will these codes will work there?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)