Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <izcmd>
- new bool:exClock[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- SetTimer("exTimer", 1000, true);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- exClock[playerid] = true;
- SendClientMessage(playerid, -1, "{FFFF00}Otomatik Saat {FFFFFF}aktif!");
- return 1;
- }
- forward exTimer();
- public exTimer()
- {
- new ex_Saat, ex_Dakika, ex_Saniye;
- gettime(ex_Saat, ex_Dakika, ex_Saniye);
- for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(exClock[i] == true)
- {
- SetPlayerTime(i, ex_Saat, ex_Dakika);
- }
- }
- }
- return 1;
- }
- CMD:otosaat(playerid, params[])
- {
- if(exClock[playerid] == true)
- {
- exClock[playerid] = false;
- SendClientMessage(playerid, -1, "{FF00FF}Bilgi: {FFFFFF}Otomatik saat kapatildi.");
- }else
- {
- exClock[playerid] = true;
- SendClientMessage(playerid, -1, "{FF00FF}Bilgi: {FFFFFF}Otomatik saat acildi.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment