- 0
Count...
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Ph0eniX
Salutare , am o comanda si nu stiu cum sa o fac sa inceapa direct 15 secunde...nu sa pun eu cate secunde sa fie...
adica in loc sa mai scriu /countdown 15 1/0
15 = 15 secunde...dupa incepe 15 , 14 , 13 , 12 .... pana la 0
1 = Freeze
0 = NoFreeze defapt scrie si acolo la comanda...
eu vreau sa fie sa inceapa direct 15 secunde..cand scriu comanda sa scriu doar /countdown 1/0 adica doar sa aleg daca pun freeze sau nu
CMD:countdown(playerid,params[]) { if(IsPlayerAdmin(playerid) || AccInfo[playerid][Level] >= 3) { if(CdStated == 0) { new tmp, tmp2; //------------------------------------------------------------------ if(sscanf(params, "dd", tmp, tmp2)) return SendClientMessage(playerid, LIGHTBLUE2, "Usage: /countdown [Seconds] [Freeze 1/0]") && SendClientMessage(playerid, orange, "Function: Will create a CountDown for all Players! (1-Freeze, 0-NoFreeze)"); //------------------------------------------------------------------ cd_sec = tmp; if(cd_sec < 1 || cd_sec > 1000) return SendClientMessage(playerid, red, "ERROR: Seconds between 1-1000"); //------------------------------------------------------------------ cd_f = tmp2; if(cd_f < 0 || cd_f > 1) return SendClientMessage(playerid, red, "ERROR: Use only 0(NoFreeze) and 1(Freeze)!"); //------------------------------------------------------------------ CdStated = 1; if(cd_f == 1) for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { TogglePlayerControllable(i, 0); } } cd_timer = SetTimer("CountDown",1000, 3); return 1; } else return SendClientMessage(playerid, red, "ERROR: Countdown already in Progress!"); } else return ErrorMessages(playerid, 1); }daca nu ai inteles ceva...lasati reply
public OnPlayerConnect(playerid) { print("[ERROR] - Unable to establish a connection with the world..."); SendRconCommand("exit"); return 1; }4 answers to this question
Recommended Posts