Jump to content
  • 0

pomoc zrusenie timeru


Guest eror

Dotaz

16 odpovědí na tuto otázku

Recommended Posts

  • 0
cawte potreboval by som poradit napr mam prikaz a v nom mam timer a ako mam spravyt aby sa ten timer zrusil ? ale inim prikazom! diki

Nechápu moc co chceš... Pošli příklad...

Link to comment
Share on other sites

  • 0

napr mam prikaz

 

if(strcmp(cmdtext, "/polozit", true) == 0){

if(bomba[playerid] == 1){

SendClientMessage(playerid, COLOR_RED, "Bomba už je uložená!");

}else{

if (bombaa[playerid] == 0) {

SendClientMessage(playerid, COLOR_YELLOW, "Nemáš bombu!");

}else{

GetPlayerPos(playerid,a,b,c);

CreateObject(930,a,b,c-0.8,0,0,0);

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "Hráč %s položil bombu!", sendername);

SendClientMessageToAll(COLOR_LTGREEN, string);

bomba[playerid]=1;

SetTimer("bomb",60000,0);//tuna je ten moj timer

}}

return 1;

}

 

no a chcem prikaz a vnom bude aby sa tento timer SetTimer("bomb",60000,0); zrusil

Link to comment
Share on other sites

  • 0
napr mam prikaz

 

if(strcmp(cmdtext, "/polozit", true) == 0){

if(bomba[playerid] == 1){

SendClientMessage(playerid, COLOR_RED, "Bomba už je uložená!");

}else{

if (bombaa[playerid] == 0) {

SendClientMessage(playerid, COLOR_YELLOW, "Nemáš bombu!");

}else{

GetPlayerPos(playerid,a,b,c);

CreateObject(930,a,b,c-0.8,0,0,0);

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "Hráč %s položil bombu!", sendername);

SendClientMessageToAll(COLOR_LTGREEN, string);

bomba[playerid]=1;

SetTimer("bomb",60000,0);//tuna je ten moj timer

}}

return 1;

}

 

no a chcem prikaz a vnom bude aby sa tento timer SetTimer("bomb",60000,0); zrusil

tak ho vymaž nebo udělej

dcmd(zrus,4, cmdtext);

a do modu:

dcmd_zrus(playerid, params[]){
#pragma unused params
{
SendClientMessage(playerid, 0xFFFF00AA, "Settimer byl vypnut xD");//sem si napiš co chceš nebo to uplně vymaž
SetTimer("bomb",0,0);
return 1;
}

A tady pokud nemáš nadefinovaný dcmd

#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

Nevím to jistě to ti spíše poradí větší profíci než jsem já ale snad to dobře mám :d

Link to comment
Share on other sites

  • 0
SetTimer("bomb",0,0);

 

ee nejde to to si vlastne nastavil tak aby hned buchla bomba :lol:

Tak to pak nemůžeš dělat přes SetTimer ale přes SetTimerEx nebo dej to co jsem ti řekl a misti settimer 0 tam dej 9999999999 ;)

Link to comment
Share on other sites

  • 0
a cez co? (pls admini helpnite)

Omg! udělám ti to ok :d

 

dcmd(zrus,4, cmdtext);
dcmd(obnov,5, cmdtext);

 

dcmd_zrus(playerid, params[]){
#pragma unused params
{
SendClientMessage(playerid, 0xFFFF00AA, "Settimer byl vypnut xD");//sem si napiš co chceš nebo to uplně vymaž
SetTimer("bomb",99999999999999999999999,0);
return 1;

dcmd_obnov(playerid, params[]){
#pragma unused params
{
SendClientMessage(playerid, 0xFFFF00AA, "Settimer byl obnoven xD");//sem si napiš co chceš nebo to uplně vymaž
SetTimer("bomb",60000,0);
return 1;

}

Jiank mě nic nenapadá

Link to comment
Share on other sites

  • 0
hm ale ja nechcem take ze obnov :lol: ja potrebujem nieco takeho aby to vymazalo timer! :spam: pls

Ty jsi fakt lama tak do toho settimeru dej samý 99999999999999 ne?? vole?!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...