Započeo mijata
•9. Jan. 2015.• Zaključano[Pomoc]Bomba
1,783
pregleda
43
postova
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
108
Postovi:
26
Teme:
Pridružio se:Feb. 2014
9. Jan. 2015.
Skripta koju koristim😄M
Detaljan opis problema😛ROBLEM JE U TOME sto igrac moze da planta bombu bilo gde i moze da spamuje komandu /plantbomb tako isto i sa /defusebomb treba mi da igrac moze da planta samo na mesu za plantanje i da moze da defuse samo na mestu za defuse nesto sam zeznuo pa bih molio za pomoc
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Detaljan opis problema😛ROBLEM JE U TOME sto igrac moze da planta bombu bilo gde i moze da spamuje komandu /plantbomb tako isto i sa /defusebomb treba mi da igrac moze da planta samo na mesu za plantanje i da moze da defuse samo na mestu za defuse nesto sam zeznuo pa bih molio za pomoc
Dio skripte:
#include
#define T1 0
#define C1 1
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
new gTeam;
new PlantedBomb;
public OnGameModeInit()
{
SetGameModeText("Blank Script");
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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(gTeam == T1)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216))
if(PlantedBomb == 1) return SendClientMessage(playerid,COLOR_RED,"The bomb is already planted!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
}
return 1;
}
if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
if(gTeam == C1)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,213.3134,1825.4974,6.4141))
if(PlantedBomb == 0) return SendClientMessage(playerid,COLOR_RED,"The bomb is not planted!");
if(gTeam == T1) return SendClientMessage(playerid,COLOR_RED,"Only the cops can defuse the bombs, your job is to plant them!");
SendClientMessage(playerid,COLOR_BLUE,"You are defusing a bomg, please wait.");
SetTimer("Defusion",10000,0);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not in the place for defusing the bomb!");
}
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",3000,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("~b~Bomb defused",3000,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)://
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
9. Jan. 2015.
Ako sam te dobro razumeo zelis napraviti neke bombe gde igraci mogu da postave gde hoce a za uklanjanje te bombe da moze samo tamo gde je bomba postavljena... Ako si tako zamislio onda moras napraviti poseban enum za te bombe sa njenim varijablama za kordinate i te stvari koje ti za to trebaju to mozes videti kako je radjeno za kuce ili firme pa na taj kalup i onda preko tih varijabli sve radis...
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
108
Postovi:
26
Teme:
Pridružio se:Feb. 2014
9. Jan. 2015.
nisi me lepo razuemo ja zelim da igrac moze da postavi bombu samo ako je u timu terorista na odredjeno mesto i da policija moze da defuse tu bombu samo na tom mestu gde je postavljena/plant
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
9. Jan. 2015.
Aha, dobro vidim napisao si problem s kordinatom tako da ovo sto ti imas kao kordinata
Trebalo bi ovako da izgleda
if(IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216))Trebalo bi ovako da izgleda
if(!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216)) return SCM (playerid, -1, "Tvoj text");Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
108
Postovi:
26
Teme:
Pridružio se:Feb. 2014
9. Jan. 2015.
pazi uradio sam ovako
ali ima 26 errora
#include
#define T1 0
#define C1 1
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
new gTeam;
new PlantedBomb;
public OnGameModeInit()
{
SetGameModeText("Blank Script");
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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(gTeam == T1)
{
if(IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1820.3402,6.4216))
if(PlantedBomb == 1) return SendClientMessage(playerid,COLOR_RED,"The bomb is already planted!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");
}
if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
if(gTeam == C1)
{
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!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not in the place for defusing the bomb!");
}
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",3000,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("~b~Bomb defused",3000,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;
}ali ima 26 errora
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
9. Jan. 2015.
Ako imas 26 errora onda si negde napravio propust sa zagradama { ili } pokusaj se setiti sta si zadnje radio pre no sto je nastao ovaj problem pa onda pregledaj zagrade...
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
108
Postovi:
26
Teme:
Pridružio se:Feb. 2014
9. Jan. 2015.
sad sam resio errore ali sada je opet isti problem pogledaj i aj dodaj mi ti sta treba nemogu vise da se mucim 100 god 😄
#include
#define T1 0
#define C1 1
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
#define SCM
new gTeam;
new PlantedBomb;
public OnGameModeInit()
{
SetGameModeText("Blank Script");
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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(IsPlayerInRangeOfPoint(playerid,2.0,212.9239,18 20.3402,6.4216))
if(PlantedBomb == 1) return SendClientMessage(playerid,COLOR_RED,"The bomb is already planted!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1 820.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!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",3000,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("~b~Bomb defused",3000,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;
} OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
9. Jan. 2015.
Aj vidi sad jel to sto si hteo
#include
#define T1 0
#define C1 1
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
#define SCM
new gTeam;
new PlantedBomb;
public OnGameModeInit()
{
SetGameModeText("Blank Script");
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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(!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1 820.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!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1 820.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!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",3000,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("~b~Bomb defused",3000,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;
}
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
108
Postovi:
26
Teme:
Pridružio se:Feb. 2014
9. Jan. 2015.
D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\BOMBA.pwn(71) : error 001: expected token: ",", but found "-rational value-"
D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\BOMBA.pwn(71) : warning 215: expression has no effect
D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\BOMBA.pwn(71) : warning 215: expression has no effect
D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\BOMBA.pwn(71) : error 001: expected token: ";", but found ")"
D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\BOMBA.pwn(71) : error 029: invalid expression, assumed zero
D:\Documents and Settings\mijata_2.XPSP3-WBB\Desktop\BOMBA.pwn(71) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
linija 71 :
if(!IsPlayerInRangeOfPoint(playerid,2.0,212.9239,1 820.3402,6.4216)) return SendClientMessage(playerid,COLOR_RED,"You are not in the place for planting the bomb");OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
10. Jan. 2015.
#include
#define T1 0
#define C1 1
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
#define SCM
new gTeam;
new PlantedBomb;
public OnGameModeInit()
{
SetGameModeText("Blank Script");
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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(!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!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
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!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",3000,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("~b~Bomb defused",3000,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;
}
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
10. Jan. 2015.
Napravi varijablu za to pa preko nje proveravaj... Ako ne znas kako tu sam ali mi reci jel hoces da se sacuva u nalog da je igrac policajac ili ce se to odredjivati komandom nekom ili sta znm sta si vec zamislio...
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
108
Postovi:
26
Teme:
Pridružio se:Feb. 2014
10. Jan. 2015.
pa meni samo treba da ovu komanud /defusebomb mogu samo policajci da koriste na onom mestu gde je bomba postavljena a ovo je samo fs za gamemod netreba nista da sacuva u profil korisnika C1 je policija a T1 su teroristi uradi mi jos to pls, da ako igrac nije na mestu za defuse izadje poruka da nije i ako je na mestu onda da izadje za sve gametextforall bomb defused i da nemoze da defuse ako nije postavljena bomba
ako ne razumes onda ce ti ovako biti lakse
komanda /defusebomb
samo za policiju C1
nemoze da defuse ako nije plantirana bomba
i nemoze da defuse ako nije na mestu gde je bomba postavljena
ako je na mestu onda mora cekati 5 min i kad prodje pet min dobije score 5 i 10k
i igracima izadje poruka BOMB HAS BEEN DEFUSED
ako ne razumes onda ce ti ovako biti lakse
komanda /defusebomb
samo za policiju C1
nemoze da defuse ako nije plantirana bomba
i nemoze da defuse ako nije na mestu gde je bomba postavljena
ako je na mestu onda mora cekati 5 min i kad prodje pet min dobije score 5 i 10k
i igracima izadje poruka BOMB HAS BEEN DEFUSED
OG Legend
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
246 / 250 XP
Početnik(0)
2,678
Postovi:
133
Teme:
Pridružio se:Maj 2012
10. Jan. 2015.
Napravis u toj FS ovako nesto recimo.
Na vrh
I u tu komandu koja je samo za njih stavis
I to je to a ti smisli kako ces dati igracu da bude Policajac
Na vrh
new Policija;I u tu komandu koja je samo za njih stavis
if (Policija != 1) return SCM (playerid, -1, "Tvoj text ako nije PD");I to je to a ti smisli kako ces dati igracu da bude Policajac
Policija = 1;Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
108
Postovi:
26
Teme:
Pridružio se:Feb. 2014
10. Jan. 2015.
e sad sam ovako uradio ali i policiji i teroristima pise da samo policija moze da defuse bombu
a meni treba da to pise samo teroristima
uradi mi pa mi posalji
ima jos jedan problem sa /plantbomb sad mogu i policajci da postave bombu a treba da samo teroristi mogu
i niko nemoze da defuse bombu svima pise da samo policija moze a to treba da radi samo za policiju
a meni treba da to pise samo teroristima
#include
#define T1 0
#define C1 1
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000BBAA
#define SCM
new gTeam;
new PlantedBomb;
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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(!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!");
if(gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the terrorists can plant the bomb!");
PlantedBomb ++;
GameTextForAll("~r~Bomb has been planted!",3000,5);
SetTimer("Explosion",300000,0);
}
if (strcmp("/defusebomb", cmdtext, true, 10) == 0)
{
if(!gTeam == C1) return SendClientMessage(playerid,COLOR_RED,"Only the cops can defuse the bomb, your job is to plant it!");
if(IsPlayerInRangeOfPoint(playerid,2.0,213.3134,1825.4974,6.4141))
if(PlantedBomb == 0) return SendClientMessage(playerid,COLOR_RED,"The bomb is not planted!");
SendClientMessage(playerid,COLOR_BLUE,"You are defusing a bomg, please wait.");
SetTimer("Defusion",10000,0);
}
return 0;
}
forward Explosion(playerid);
public Explosion(playerid)
{
GameTextForAll("~r~Bomb exploded",3000,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("~b~Bomb defused",3000,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;
}
uradi mi pa mi posalji
ima jos jedan problem sa /plantbomb sad mogu i policajci da postave bombu a treba da samo teroristi mogu
i niko nemoze da defuse bombu svima pise da samo policija moze a to treba da radi samo za policiju
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava