20.04.2015, 10:54
I want something in my gamemode that will do like if a player plays 1 hour, he will get $1000 and a message "You have played an hour and for that you get $1000", my script is strcmp.
new moneytimer[MAX_PLAYERS];
forward UpdateTimer(playerid);
public OnPlayerConnect(playerid)
{
moneytimer[playerid] = SetTimerEx("UpdateTimer", 1000*60*60, true, "i", playerid);
return 1;
}
public OnPlayerDisconnect(playerid)
{
KillTimer(moneytimer[playerid]);
return 1;
}
public UpdateTimer(playerid)
{
GivePlayerMoney(playerid, 1000);
SendClientMessage(playerid, -1, "You have played for 1 hour straight! Enjoy your $1000!");
return 1;
}