Jump to content
  • 0

pomoc Odpočet len na 3 sekundy


INSANE_25_ICON

Dotaz

Čaute. Potrebujem odpočet len na 3 sekundy robím na tom už asi 2 hodinky ale furt do toho len čumím ako deb*l. Pomohol mi aj eXitenz ale nechcem ho oteravovať on mi to urobil ako prikaz ale ja to chcem dať do Most Wantedu čo prave sa chystám robiť. Prepáčte neviem robiť Spoilery. Potrebujem tam pridať ten odpočet na 3 sekundy pokiaľ mi viete pomoc tak prosím pomožte. Ďakujem za užitočné radi. :)

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
new sendername[100];
new string [256];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[  !  ] "r"Hríč "y"%s "w"se "r"přidal "y"na "w"Most "r"Wanted "y"Rally "w"!", sendername);
SendClientMessageToAll(0x33ccffaa, string);
SetPlayerPos(playerid,1647.1414,1944.0651,10.8203);
MW = CreateVehicle(411,1656.3195,1937.2814,10.8203,263.1314,149,0,20);
PutPlayerInVehicle(playerid, MW, 0);
SetPlayerCheckpoint(playerid, 1695.2438,1943.8365,10.5474, 10.0);
cp[playerid] = 0;
return 1;
}
return 0;
}
Link to comment
Share on other sites

9 odpovědí na tuto otázku

Recommended Posts

  • 0

format(string, sizeof(string), "[  !  ] "r"Hríč "y"%s "w"se "r"přidal "y"na "w"Most "r"Wanted "y"Rally "w"!", sendername);

ak tam chceš dať farby tak namiesto y, w... daj farby ale cele to musí byť v úvodzovkách.

Link to comment
Share on other sites

  • 0

SetTimer("Countdown",1000,true);

 

forward Countdown();

new secs = 3;

public Countdown()

{

if(--secs == 0) {

SendClientMessageToAll(-1,"3 sekundy vasho zivota su v prdeli");

}

SendClientMessageToAll(-1,"Zostava %d sekund",secs);

return 1;

}

 

Nejako takto je princíp. Prerob si to.

Link to comment
Share on other sites

  • 0
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
new sendername[100];
new string [256];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[  !  ] "r"Hríč "y"%s "w"se "r"přidal "y"na "w"Most "r"Wanted "y"Rally "w"!", sendername);
SendClientMessageToAll(0x33ccffaa, string);
SetPlayerPos(playerid,1647.1414,1944.0651,10.8203);
MW = CreateVehicle(411,1656.3195,1937.2814,10.8203,263.1314,149,0,20);
PutPlayerInVehicle(playerid, MW, 0);
SetPlayerCheckpoint(playerid, 1695.2438,1943.8365,10.5474, 10.0);
cp[playerid] = 0;
return 1;
}
return 0;
}

sem pridaj ten SetTimer("Countdown",1000,true);

//ten timer je na 1 sekundu
forward Countdown();
new secs = 3; //kolko sekund to ma odpocitavat
public Countdown() {
if(--secs == 0) { //toto odcita z tych 3 sekund 1 kedze timer je nastaveny na sekundu a automaticky to porovna ci sa to nerovna 0, ak sa to 0 rovna tak si pridaj vlastnu akciu co sa ma stat ked sa odpocet skonci. odporucam znovu nastavit secs na 3, ked chces ten timer pouzit zasa
}
return 1;
}
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...