12.03.2014, 19:01
Hello !
I used to play on a local server with my high-school friends. Can anyone add a timer for me, to make the bank "rob-able" once per hour?
Thanks in advice !
I`m a begginer, else I wouldn't ask you for this, so please don't be mean :P
PS: This rob system is spreaded all over my gamemode, if I missed something please tell me.
I used to play on a local server with my high-school friends. Can anyone add a timer for me, to make the bank "rob-able" once per hour?
Код:
if(strcmp(cmd,"/rob",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pLevel] >= 3) { if(PlayerToPoint(10.0, playerid, 2311.8804,-10.4994,26.7422) && GetPlayerVirtualWorld(playerid) == 41) { if(robbinghour>=1) { if(allowedrob == 1) { PlayerInfo[playerid][pRobbingBank] = 1; SendClientMessage(playerid, COLOR_LIGHTRED, "{a9c4e4}Du-te la {ee5555}checkpoint-ul{a9c4e4} marcat in cladire si ia banii."); SetPlayerCheckpoint(playerid, 2306.3003,-7.3777,26.7422, 2); CP[playerid] = 792; robbinghour = 0; return 1; } else { SendClientMessage(playerid, COLOR_LIGHTRED, "{DC0C0C}Rob: {FFFFFF}Adminul a inchis temporar sistemul de jafuri."); return 1; } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "Cineva deja a jefuit banca!"); return 1; } } if(PlayerToPoint(10.0, playerid, 2311.8804,-10.4994,26.7422) && GetPlayerVirtualWorld(playerid) == 42) { if(lvrobbinghour>=72) { if(allowedrob == 1) { PlayerInfo[playerid][pRobbingBank] = 1; SendClientMessage(playerid, COLOR_LIGHTRED, "{a9c4e4}Du-te la {ee5555}checkpoint-ul{a9c4e4} marcat in cladire si ia banii."); SetPlayerCheckpoint(playerid, 2306.3003,-7.3777,26.7422, 2); CP[playerid] = 792; lvrobbinghour = 0; return 1; } else { SendClientMessage(playerid, COLOR_LIGHTRED, "{DC0C0C}Rob: {FFFFFF}Adminul a inchis temporar sistemul de jafuri."); return 1; } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "Cineva a jefuit deja banca!"); return 1; } } else { SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa fii la banca."); return 1; } } else return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu ai nivelul 5."); } } if(strcmp(cmd, "/allowrob", true) == 0 || strcmp(cmd, "/ar", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 5) { if(allowedrob == 0) { robbinghour = 72; lvrobbinghour = 72; allowedrob = 1; SendClientMessage(playerid, COLOR_LIGHTBLUE, "{DC0C0C}Ai permis jucatorilor sa jefuiasca banca!"); return 1; } if(allowedrob == 1) { allowedrob = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "{DC0C0C}Ai interzis jucatorilor sa jefuiasca banca!"); return 1; } } } }
I`m a begginer, else I wouldn't ask you for this, so please don't be mean :P
PS: This rob system is spreaded all over my gamemode, if I missed something please tell me.