[Pomoc]Problem sa bombom

Započeo mijata
10. Jan. 2015. Zaključano
541
pregleda
21
postova
mijata
4
Shot Caller
10. Jan. 2015.
Skripta koju koristim😄M
Detaljan opis problema:rudimental je uradio ali sada imam problem da posle bomb explode nemoze nijedna bomba vise da se planta pise ono bomb is already planted i da posle bomb explode nemoze da se defuse bomba , problem je i sto kad izadjem sa servera fs zapamti tim na primer bio sam terorista i ono zapamti kao da sam opet terorista aj pomagajte
Dio skripte:
#include 
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
#define SCM

new PostaviTim;
new PlantedBomb = 0;

public OnGameModeInit()
{
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
return 1;
}

public OnPlayerConnect(playerid)
{
    PostaviTim = 0;
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
if (PostaviTim == 0)
{
    new Tim = random(2);
  switch(Tim)
  {
    case 0:
    {
        PostaviTim = 1;
        //SetPlayerSkin(playerid, ID Skina); // Ovo stavi ako hoces
    }
    case 1:
    {

        PostaviTim = 2;
        //SetPlayerSkin(playerid, ID Skina); // Ovo stavi ako hoces
    }
    }
    }
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/plantbomb", cmdtext, true, 10) == 0)
{
    if (PostaviTim == 2) return SendClientMessage (playerid, COLOR_RED, "Cops can't plant bomb");
if (!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216)) return SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
if (PlantedBomb == 1) return SendClientMessage(playerid,COLOR_RED,"The bomb is already planted!");
PlantedBomb = 1;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}

if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
    if (PlantedBomb == 0) return SendClientMessage(playerid,COLOR_RED,"The bomb is not planted!");
if (PostaviTim == 2)
{
if (!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216)) return SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
SendClientMessage(playerid,COLOR_RED,"You are defusing a bomg, please wait.");
SetTimer("Defusion",20000,0);
}
else
{
SendClientMessage (playerid, COLOR_RED, "Only cops can defuse bomb");
}
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",6000,5);
CreateExplosion(212.9239,1820.3402,6.4216,12,20.0) ;
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
return 1;
}
forward Defusion(playerid);
public Defusion(playerid)
{
KillTimer(0);
GameTextForAll("~r~Bomb defused",6000,5);
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}

public OnRconCommand(cmd[])
{
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnObjectMoved(objectid)
{
return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}

public OnPlayerExitedMenu(playerid)
{
return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}

public OnPlayerUpdate(playerid)
{
return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno)://
X_G1
4
Enforcer
10. Jan. 2015.


#include
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
#define SCM

new PostaviTim;
new PlantedBomb = 0;

public OnGameModeInit()
{
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
return 1;
}

public OnPlayerConnect(playerid)
{
    PostaviTim = 0;
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
if (PostaviTim == 0)
{
    new Tim = random(2);
  switch(Tim)
  {
    case 0:
    {
        PostaviTim = 1;
        //SetPlayerSkin(playerid, ID Skina); // Ovo stavi ako hoces
    }
    case 1:
    {

        PostaviTim = 2;
        //SetPlayerSkin(playerid, ID Skina); // Ovo stavi ako hoces
    }
    }
    }
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/plantbomb", cmdtext, true, 10) == 0)
{
    if (PostaviTim == 2) return SendClientMessage (playerid, COLOR_RED, "Cops can't plant bomb");
if (!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216)) return SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
if (PlantedBomb == 1) return SendClientMessage(playerid,COLOR_RED,"The bomb is already planted!");
PlantedBomb = 1;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}

if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
    if (PlantedBomb == 0) return SendClientMessage(playerid,COLOR_RED,"The bomb is not planted!");
if (PostaviTim == 2)
{
if (!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216)) return SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
SendClientMessage(playerid,COLOR_RED,"You are defusing a bomg, please wait.");
SetTimer("Defusion",20000,0);
}
else
{
SendClientMessage (playerid, COLOR_RED, "Only cops can defuse bomb");
}
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",6000,5);
CreateExplosion(212.9239,1820.3402,6.4216,12,20.0) ;
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
        PlantedBomb = 0;
return 1;
}
forward Defusion(playerid);
public Defusion(playerid)
{
KillTimer(0);
GameTextForAll("~r~Bomb defused",6000,5);
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}

public OnRconCommand(cmd[])
{
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnObjectMoved(objectid)
{
return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}

public OnPlayerExitedMenu(playerid)
{
return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}

public OnPlayerUpdate(playerid)
{
return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}

mijata
4
Shot Caller
10. Jan. 2015.
sad je problem sto zapamti ako sam bio terorista i kad udjem opet ono izbacio kao da sam opet terorista
a kad restart server onda je ok

nIJE RESENO

rudimental mozda je problem u tome sto ja imam gTeam i login/register sistem u gamemodu
Rudimental
5
OG Legend
11. Jan. 2015.
Resetuj varijablu kad izlazis sa srwa stavi pod public OnPlayerDisconnect
mijata
4
Shot Caller
11. Jan. 2015.
kako posalji
Rudimental
5
OG Legend
11. Jan. 2015.
Nije ovaj PDF uradi mi vec pomoc a kod tebe to izgleda ne vazi lakse ti je da dobijes sve gotovo nego da se bar malo pomucis... Tako nikad neces nauciti...

Stavi u taj public koji sam rekao
PostaviTim = 0;
mijata
4
Shot Caller
11. Jan. 2015.
ma mucim se ja sa ovim vec 3/4 dana  😄 , sad sam resio sve i radi i hvala
ali kad ubacim ovu fs u host onda mi neradi fs /shop za oruzija
Rudimental
5
OG Legend
11. Jan. 2015.
Kolko ti koristis FS za tvoj srw na hostu ?
mijata
4
Shot Caller
11. Jan. 2015.
jedno 6,7
Rudimental
5
OG Legend
11. Jan. 2015.
A ta FS za /shop ti je radila pre no sto si ovu ubacio ? Ako je tako probaj tu FS za /shop da stavis prvu na redu za FS ...
mijata
4
Shot Caller
11. Jan. 2015.
aha evo sad radi hvala  😄
Rudimental
5
OG Legend
11. Jan. 2015.
Ako je to to da stavim katanac ?
mijata
4
Shot Caller
11. Jan. 2015.
moze ali mi pre toga odgovori zasto ne vidim labele koje sam stavio na mapi
Rudimental
5
OG Legend
11. Jan. 2015.
Kakve labele mislis 3DText labele ? Ako su oni daj da vidim kako si uradio...
mijata
4
Shot Caller
11. Jan. 2015.
to sam resio samo imam jedan problem sa porukom kad igrac defuse bomb
kad to uradi namestio sam da mu stigne poruka ali nema poruke

#include
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
#define SCM

new PostaviTim;
new PlantedBomb = 0;

public OnGameModeInit()
{
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
return 1;
}

public OnPlayerConnect(playerid)
{
    PostaviTim = 0;
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
if (PostaviTim == 0)
{
    new Tim = random(2);
  switch(Tim)
  {
    case 0:
    {
        PostaviTim = 1;
        //SetPlayerSkin(playerid, ID Skina); // Ovo stavi ako hoces
    }
    case 1:
    {

        PostaviTim = 2;
        //SetPlayerSkin(playerid, ID Skina); // Ovo stavi ako hoces
    }
    }
    }
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/plantbomb", cmdtext, true, 10) == 0)
{
    if (PostaviTim == 2) return SendClientMessage (playerid, COLOR_RED, "Cops can't plant bomb");
if (!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216)) return SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
if (PlantedBomb == 1) return SendClientMessage(playerid,COLOR_RED,"The bomb is already planted!");
PlantedBomb = 1;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}

if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
    if (PlantedBomb == 0) return SendClientMessage(playerid,COLOR_RED,"The bomb is not planted!");
if (PostaviTim == 2)
{
if (!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216)) return SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
SendClientMessage(playerid,COLOR_RED,"You are defusing a bomg, please wait.");
SetTimer("Defusion",20000,0);
}
else
{
SendClientMessage (playerid, COLOR_RED, "Only cops can defuse bomb");
}
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",6000,5);
CreateExplosion(212.9239,1820.3402,6.4216,12,20.0) ;
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
SendClientMessage(playerid, COLOR_RED, "Bomb:you got +5 score and 10000$ for planting bomb");
    PlantedBomb = 0;
return 1;
}
forward Defusion(playerid);
public Defusion(playerid)
{
KillTimer(0);
GameTextForAll("~r~Bomb defused",6000,5);
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
SendClientMessage(playerid, COLOR_RED, "Bomb:you got +5 score and 10000$ for defusing bomb");
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}

public OnRconCommand(cmd[])
{
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnObjectMoved(objectid)
{
return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}

public OnPlayerExitedMenu(playerid)
{
return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}

public OnPlayerUpdate(playerid)
{
return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha