lil question
#1

how can i make players cant buy weapons at ammu shop and second question, how i make players gets +1 score every 5 minutes
Reply
#2

Post a Line...
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)