Jump to content

Bomba (vylepšené)


Guest [*LoNg*]LiFe

Recommended Posts

Guest [*LoNg*]LiFe

no tak neskúšal som to :!:

 

hore si dáme

 

new bomba[MAX_PLAYERS];
new Float:a,Float:b,Float:c;
do ongamemode...
SetTimer("bomb",60000,1);

 

teraz príkaz položiť bombu

 

 

if(strcmp(cmdtext, "/polozit", true) == 0){
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);
SendClientMessage(playerid, COLOR_RED, "Bomba už je uložená!");
if(bomba[playerid] == 0){
}else{
SetTimer("bomb",60000,1);
CreateExplosion(a,b,c,2,3);
DestroyObject(930);
bomba[playerid]=0;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Hráč %s odpálil bombu!", sendername);
SendClientMessageToAll(COLOR_GREY, string);
}
return 1;
}

 

príkaz zrusit bombu (doplnte si tam napr pre povolanie pirotechnik)

 

if(strcmp(cmdtext, "/zrusit", true) == 0){
if(bomba[playerid] == 0){
SendClientMessage(playerid, COLOR_RED, "Žiadna bomba neni nastrážená");
}else{
SetTimer("odblokuj",6000,1);
bomba[playerid]=0;
SendClientMessage(playerid, COLOR_RED, "Úspešne si odblokoval bombu!");
}
return 1;
}

 

OPRAVENÉ VĎAKA [other]FreeWall

Link to comment
Share on other sites

hm myslim že to máš blbě :

 

new Float:a2,Float:b2,Float:c2; - nepotřebuješ , potřebuješ jen ty první ( a,b,c)

 

a bude to vypadat takhle :

 

GetPlayerPos(playerid,a,b,c);

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

Link to comment
Share on other sites

Guest [*LoNg*]LiFe

 

a proc tam neni z,y,x

 

 

lolek nemas to jedno ci tam je z.... alb a.... to ti zisti polohu hráča GetPlayerPos(playerid,a,b,c); a tam vytvorý bombu CreateObject(930,a,b,c-0.8,0,0,0); :lol: ale FreeWall toto si nevedel? :rap:

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...