lil question - 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: lil question (
/showthread.php?tid=245792)
lil question -
tanush - 02.04.2011
how can i make players cant buy weapons at ammu shop and second question, how i make players gets +1 score every 5 minutes
Re: lil question -
[Ips]Guh - 02.04.2011
Post a Line...
Re: lil question -
Backwardsman97 - 02.04.2011
Well for the score you can use a timer that repeats every 5 minutes and gives everyone connected plus 1 score. Pretty much exactly as you say it is how it works.
pawn Код:
forward GiveScore();
//Under OnGameModeInit / OnFilterScriptInit whichever you're using
SetTimer("GiveScore",300000,1);
public GiveScore()
{
for(new i; i<MAX_PLAYERS; i++)
SetPlayerScore(i,GetPlayerScore(i)+1);
return 1;
}
I don't think a IsPlayerConnected check is really needed there. As for the ammunation thing, you could disable the interior enter/exits. Or you could do a check under OnPlayerInteriorChange and whenever they enter one of the ammunations, just send them back out. Or get their weapon data when they enter, and set it to that when they leave.