Karel12 0 Odesláno: 16. Listopad, 2014 Share Odesláno: 16. Listopad, 2014 Zdravím potřeboval bych pomoci s timerem do mého Fs. Aby když ten příkaz napíšu abych ho mohl napsat znova až za určitý čas. A aby se napsalo: Tento příkaz lze použít 1x za XXXs #include <a_samp> public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/balicek", cmdtext, true, 1000) == 0) { if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFFFFFFFF," SendClientMessage(playerid,1,"{FFFFFF}( ! ) {FF0000}Vzal sis balíček {FFFFFF}!"); return 1; } return 0; } Link to comment Share on other sites More sharing options...
0 Ar3us 0 Odesláno: 16. Listopad, 2014 Share Odesláno: 16. Listopad, 2014 http://pawno.cz/topic/39860-timer/ projdi si to. Link to comment Share on other sites More sharing options...
0 ATomas 286 Odesláno: 16. Listopad, 2014 Share Odesláno: 16. Listopad, 2014 if(strcmp("/balicek",cmdtext,true) == 0) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"Nejsi Admin"); else if(0 < GetPVarInt(playerid,"Balicek") < gettime()) return SendClientMessage(playerid,-1,"Prikaz lze pouzit jednou za 60 vterin"); /*else if(0 < GetPVarInt(playerid,"Balicek") < gettime())//alternativa { new string[128]; format(string,sizeof(string),"Prikaz lze pouzit za %d vterin",gettime()-GetPVarInt(playerid,"Balicek")); return SendClientMessage(playerid,-1,string); }*/ else { SetPVarInt(playerid,"Balicek",gettime()+60);//jednou za 60 vterin SendClientMessage(playerid,1,"{FFFFFF}( ! ) {FF0000}Vzal sis balíček {FFFFFF}!"); } return 1; } Link to comment Share on other sites More sharing options...
0 Karel12 0 Odesláno: 16. Listopad, 2014 Author Share Odesláno: 16. Listopad, 2014 Díky Link to comment Share on other sites More sharing options...
Dotaz
Karel12 0
Zdravím potřeboval bych pomoci s timerem do mého Fs. Aby když ten příkaz napíšu abych ho mohl napsat znova až za určitý čas. A aby se napsalo: Tento příkaz lze použít 1x za XXXs
Link to comment
Share on other sites
3 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now