Skripta koju koristim: 4CRP
Detaljan opis problema: Od kada sam poceo da editujem server bio mi je klasican /spawnchange znaci ukucam jedanput je normalno mesto ukucam 2x kuca...I kada se ulogujem pojavim se de odaberem ali kada umrem pojavim se na spawnu...Pa sam ubacio novi spawnchange sa dialogom da biram Kuca\nOrganizacija\nBurg\nBolnica i kada izaberem primer burg spawnam se kod burga kad se ulogujem ali kad umrem spawnam se na spawnu kako da promenim
Dio skripte:/
Neke slike/video za lakse dobivanje pomoci(neobavezno):/
[Pomoc] Spawn
733
pregleda
19
postova
26. Mar. 2014.
26. Mar. 2014.
to stavljam pod onplayerspawn a sta ovo spawn sta tu stavljam ?
if(PI[spawn_varijabla == true)
{
//spawn
}
if(PI[spawn_varijabla == true)
{
//spawn
}
26. Mar. 2014.
Evo kako je kod mene...
public OnPlayerSpawn(playerid)
{
if(flash_bomb == 1) // ako ima masku
{
flash_bomb = 0; // skida masku
}
new string1;
format(string1, 512, "~y~Online:~w~ %d ~y~Rekord:~w~ %d", Konektovano(), postojecirekord);
TextDrawSetString(OnlineRecord, string1);
TextDrawShowForPlayer(playerid, OnlineRecord);
//Zaustavljam pjesmu igracu
StopAudioStreamForPlayer(playerid);
//Slova INGAME
new ecpd = CreateDynamicObject(19353, 1555.9355, -1675.6359, 18.2061, 0.0000, 0.0000, -179.9206);
SetDynamicObjectMaterialText(ecpd, 0,"{0066ff}Policija", 60, "Arial", 24, 0, -32256, 0, 1);
new MiObjetoc = CreateDynamicObject(10671, 1599.00000000,-2335.89990234,15.30000019, 0.0000, 0.0000, -90);
SetDynamicObjectMaterialText(MiObjetoc, 0,"Dobrodošli na All Stars\nWelcome to All Stars\n", 80, "Arial", 14, 1, -16776961, 0, 1);
//new OpstinaText = CreateDynamicObject(10671, 1476.8375, -1776.2397, 28.4175, 0.0000, 0.0000, -90.7948);
//SetDynamicObjectMaterialText(OpstinaText, 0,"Opstina\n", 80, "Arial", 36, 1, -16776961, 0, 1);
//new BankaText = CreateDynamicObject(10671, 1462.0978, -1020.3768, 32.1606, 0.0000, 0.0000, 89.5200);
//SetDynamicObjectMaterialText(BankaText, 0,"Banka\n", 80, "Arial", 36, 1, -16776961, 0, 1);
new ZabranjenPark = CreateDynamicObject(4238, 1535.8951, -1672.2250, 12.4137, -120.3999, -96.3000, 174.4733);
SetDynamicObjectMaterialText(ZabranjenPark, 0,"ZABRANJENO PARKIRANJE", 130, "Arial", 32, 1, -1, 0, 1);
// new PolicijaText = CreateDynamicObject(7930, 1535.80004883,-1672.80004883,12.29999962,0.00000000,90.00000000,0.00000000);
//SetDynamicObjectMaterialText(PolicijaText, 0,"Zabranjeno Parkiranje\n", 80, "Arial", 36, 1, -16776961, 0, 1);
SetObjectMaterial(comisaria, 4, 19378, "all_walls", "mp_shop_floor2", 0);
SetObjectMaterial(comisaria, 5, 19378, "all_walls", "mp_shop_floor2", 0);
SetObjectMaterial(comisaria, 6, 19378, "all_walls", "cj_lightwood", 0);
SetObjectMaterial(comisaria, 7, 19378, "all_walls", "cj_lightwood", 0);
SetObjectMaterial(comisaria, 8, 19378, "all_walls", "cj_lightwood", 0);
SetObjectMaterial(comisaria, 12, 4586, "skyscrap3_lan2", "sl_skyscrpr05", 0);
SetObjectMaterial(comisaria, 13, 19378, "all_walls", "mp_shop_floor2", 0);
//native SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
//-----------
// TextDrawShowForPlayer(playerid, RandomText);
// TextDrawShowForPlayer(playerid, RandomTextBG);
TextDrawShowForPlayer(playerid, Text:Textdraw0);
TextDrawShowForPlayer(playerid, Text:Textdraw1);
TextDrawShowForPlayer(playerid, Text:Textdraw2);
TextDrawShowForPlayer(playerid, Text:Textdraw3);
TextDrawShowForPlayer(playerid, se1);
TextDrawShowForPlayer(playerid, Textdraw3000);
TextDrawShowForPlayer(playerid, Textdraw4000);
TextDrawShowForPlayer(playerid, Textdraw7000);
TextDrawShowForPlayer(playerid, Textdraw8000);
TextDrawShowForPlayer(playerid, Textdraw9000);
TextDrawShowForPlayer(playerid, Textdraw10000);
TextDrawShowForPlayer(playerid, Textdraw11000);
TextDrawShowForPlayer(playerid, Textdraw12000);
TextDrawShowForPlayer(playerid, Linijenadnu1);
TextDrawShowForPlayer(playerid, Linijenadnu2);
TextDrawShowForPlayer(playerid, Linijenadnu3);
TextDrawShowForPlayer(playerid, Linijenadnu4);
TextDrawShowForPlayer(playerid, Linijenadnu5);
TextDrawShowForPlayer(playerid, Linijenadnu6);
TextDrawShowForPlayer(playerid, Linijenadnu7);
TextDrawShowForPlayer(playerid, Linijenadnu8);
TextDrawShowForPlayer(playerid, Linijenadnu9);
TextDrawShowForPlayer(playerid, Textdraw51);
TextDrawShowForPlayer(playerid, Zlato);
TextDrawShowForPlayer(playerid, Datum);
TextDrawShowForPlayer(playerid, Vreme);
TextDrawShowForPlayer(playerid, MP);
TextDrawHideForPlayer(playerid, LoginTD0);
TextDrawHideForPlayer(playerid, LoginTD1);
TextDrawHideForPlayer(playerid, LoginTD2);
TextDrawHideForPlayer(playerid, LoginTD3);
TextDrawHideForPlayer(playerid, LoginTD4);
TextDrawHideForPlayer(playerid, LoginTD5);
TextDrawHideForPlayer(playerid, LoginTD6);
for(new carid=0; carid {
}
InitLockDoors(playerid);
NeMozeCMD = 0;
STDPlayer = 0;
PostaviSpawn(playerid);
//BojaIgracaSaWanted(playerid);
gTeam = PlayerInfo;
if(gTeam == 4)
{
gTeam = 3;
}
if(gPlayerLogged == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Morate se registrovati pre spawna.");
}
if(gTeam == 11 && PlayerInfo < 1)
{
MedicBill = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Vise niste lider,sada ste civil.");
PlayerInfo = 3;
gTeam = 3;
SetSpawnInfo(playerid, gTeam, CIV,0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo = CIV;
SpawnPlayer(playerid);
PostaviSpawn(playerid);
}
if(gTeam == 5)
{
if(PlayerInfo < 1)
{
MedicBill = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Vise niste clan organizacije,sada ste civil.");
PlayerInfo = 3;
gTeam = 3;
SetSpawnInfo(playerid, gTeam, CIV,0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo = CIV;
SpawnPlayer(playerid);
PostaviSpawn(playerid);
}
}
if(gTeam == 10)
{
if(PlayerInfo != 8)
{
MedicBill = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Vise niste clan organizacije,sada ste civil.");
PlayerInfo = 3;
gTeam = 3;
SetSpawnInfo(playerid, gTeam, CIV,0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo = CIV;
SpawnPlayer(playerid);
PostaviSpawn(playerid);
}
}
if(gTeam == 2 && PlayerInfo > 3)
{
MedicBill = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Vise niste clan organizacije,sada ste civil.");
PlayerInfo = 3;
gTeam = 3;
SetSpawnInfo(playerid, gTeam, CIV,0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo = CIV;
SpawnPlayer(playerid);
PostaviSpawn(playerid);
}
if(gTeam == 3)
{
if(PlayerInfo > 0 || PlayerInfo > 0)
{
MedicBill = 0;
new model = PlayerInfo;
if(PlayerInfo == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 2; gTeam = 2; PlayerInfo = model; }
else if(PlayerInfo == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 2; gTeam = 2; PlayerInfo = model; }
else if(PlayerInfo == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 2; gTeam = 2; PlayerInfo = model; }
else if(PlayerInfo == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 1; gTeam = 1; PlayerInfo = model; }
else if(PlayerInfo == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 5; gTeam = 5; PlayerInfo = model; }
else if(PlayerInfo == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 10; gTeam = 10; PlayerInfo = model; }
else if(PlayerInfo == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 12; gTeam = 12; PlayerInfo = model; }
else if(PlayerInfo == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 12; gTeam = 12; PlayerInfo = model; }
else if(PlayerInfo == 14) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 5; gTeam = 5; PlayerInfo = model; }
else if(PlayerInfo == 15) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 5; gTeam = 5; PlayerInfo = model; }
else if(PlayerInfo == 16) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 5; gTeam = 5; PlayerInfo = model; }
else if(PlayerInfo == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 5) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
else if(PlayerInfo == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo = 11; gTeam = 11; PlayerInfo = model; }
SpawnPlayer(playerid);
PostaviSpawn(playerid);
}
}
if(PlayerInfo > 0)
{
SetPlayerSkin(playerid, PlayerInfo);
}
else
{
SetPlayerSkin(playerid, PlayerInfo);
}
SetPlayerWeapons(playerid);
SetPlayerSpawn(playerid);
SetPlayerToTeamColor(playerid);
PlayerFixRadio(playerid);
SetPVarInt(playerid, "Izbegavanje", 0);
for(new i = 0; i < sizeof(Turfs); i++)
{
GangZoneShowForPlayer(playerid, i, TurfInfo);
return 1;
}
if(PlayerInfo == 1)
{
new zatvoren;
zatvoren = PlayerInfo;
new string;
format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~w~U zatvoru ste jos~n~~r~%d ~w~sekundi!", zatvoren); //ispisuje igracu koliko ima vremena za odraditi
GameTextForPlayer(playerid, string, 6000, 3); //Piše mu poruku preko ekrana
}
if(MapIconsShown != 1)
{
MapIconsShown = 1;
for(new i = 0; i < sizeof(BizzInfo); i++)
{
SetPlayerMapIcon(playerid,i + 1,BizzInfo,BizzInfo,BizzInfo,36,COLOR_LIGHTRED);
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
SetPlayerMapIcon(playerid,i + 20,SBizzInfo,SBizzInfo,SBizzInfo,36,COLOR_LIGHTRED);
}
}
return 1;
} 26. Mar. 2014.
Moze ovako sto sam napravio...
if(PlayerInfo == 1)
{
//rand = random(sizeof(gRandomJailSpawns));
//SetPlayerPos(playerid, gRandomJailSpawns, gRandomJailSpawns, gRandomJailSpawns);
SendClientMessage(playerid, SVETLOPLAVA, "Nepotpuna zatvorska kazna, nazad u zatvor!.");
return 1;
}
if(PlayerInfo == 2)
{
SetPlayerInterior(playerid, 0);
//PlayerInfo = 0;
JBC_SetPlayerPos(playerid,268.5777,1857.9351,9.8133);
SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
return 1;
}
if(PlayerInfo == SPAWN_BAZA)
{
if(PlayerInfo == 1 || PlayerInfo == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 2527.5425,-1666.6448,15.1681);
SetPlayerFacingAngle(playerid, 90.0);
return 1;
}
else if(PlayerInfo == 2 || PlayerInfo == 2)
{
SetPlayerInterior(playerid, 10);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 219.4916,121.3164,1003.2188);
SetPlayerFacingAngle(playerid, 187.3231);
return 1;
}
else if(PlayerInfo == 3 || PlayerInfo == 3)
{
SetPlayerInterior(playerid, 6);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 219.2759,69.9270,1005.0391);
SetPlayerFacingAngle(playerid, 267.3275);
return 1;
}
else if(PlayerInfo == 4 || PlayerInfo == 4)
{
SetPlayerInterior(playerid, 18);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 1731.7728,-1658.4608,20.2395);
SetPlayerFacingAngle(playerid, 87.1074);
return 1;
}
else if(PlayerInfo == 5 || PlayerInfo == 5)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, -2100.3774,-196.4825,35.3203);
SetPlayerFacingAngle(playerid, 107.1323);
return 1;
}
else if(PlayerInfo == 6 || PlayerInfo == 6)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 1126.0670,-2039.3267,69.8825);
SetPlayerFacingAngle(playerid, 269.9971);
return 1;
}
else if(PlayerInfo == 7 || PlayerInfo == 7)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 1215.2629,-1814.1791,16.5938);
SetPlayerFacingAngle(playerid, 267.6829);
return 1;
}
else if(PlayerInfo == 9 || PlayerInfo == 9)
{
JBC_SetPlayerPos(playerid, 1262.8345,-1640.4919,13.5469);
SetPlayerInterior(playerid,3);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 180);
}
else if(PlayerInfo == 11 || PlayerInfo == 11)
{
JBC_SetPlayerPos(playerid, -2308.4485,-22.9313,35.3203);
SetPlayerInterior(playerid,0);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 180);
}
else if(PlayerInfo == 10 || PlayerInfo == 10)
{
JBC_SetPlayerPos(playerid, 331.5380,-1509.3550,36.0391);
SetPlayerInterior(playerid,0);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 180);
}
else if(PlayerInfo == 2)
{
JBC_SetPlayerPos(playerid, 107.2300,1920.6311,18.5208);
SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453);
ResetPlayerWeapons(playerid);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
else if(PlayerInfo == 8 || PlayerInfo == 8)
{
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 2205.5852,1610.8656,999.9745);
SetPlayerFacingAngle(playerid, 3.3455);
return 1;
}
else
{
PlayerInfo = SPAWN_OBICAN;
new Random = random(sizeof(RandSpawn));
JBC_SetPlayerPos(playerid, RandSpawn, RandSpawn, RandSpawn);
//SetPlayerPos(playerid, 687.8200,-1356.6272,13.5688);
SetPlayerFacingAngle(playerid, 1.2481);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
else if(PlayerInfo == SPAWN_KUCA)
{
if(PlayerInfo != 255)
{
new k = PlayerInfo == 255;
JBC_SetPlayerPos(playerid, HouseInfo, HouseInfo, HouseInfo);
SetPlayerFacingAngle(playerid, HouseInfo);
SetPlayerInterior(playerid, HouseInfo);
SetPlayerVirtualWorld(playerid, HouseInfo);
InsideHouse = k;
SetCameraBehindPlayer(playerid);
return 1;
}
else
{
PlayerInfo = SPAWN_OBICAN;
new Random = random(sizeof(RandSpawn));
JBC_SetPlayerPos(playerid, RandSpawn, RandSpawn, RandSpawn);
//SetPlayerPos(playerid, 687.8200,-1356.6272,13.5688);
SetPlayerFacingAngle(playerid, 1.2481);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
else if(PlayerInfo == SPAWN_BOLNICA)
{
//if(PlayerInfo != 0)
//{
//new i = PlayerInfo;
// SetPlayerInterior(playerid, 0);
// SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 1172.6563,-1361.4929,14.3519);
SetCameraBehindPlayer(playerid);
return 1;
}
}
else if(PlayerInfo == SPAWN_OPSTINA)
{
//if(PlayerInfo != 0)
//{
//new i = PlayerInfo;
// SetPlayerInterior(playerid, 0);
// SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, 1448.7629,-1766.5133,13.5469);
SetCameraBehindPlayer(playerid);
return 1;
}
}
/*if(PlayerInfo == SPAWN_BOLNICA);
{
//if(PlayerInfo != 0)
//{
//new i = PlayerInfo;
// SetPlayerInterior(playerid, 0);
// SetPlayerVirtualWorld(playerid, 0);
//JBC_SetPlayerPos(playerid, 1172.6563,-1361.4929,14.3519);
//SetCameraBehindPlayer(playerid);
return 1;
}
}*/Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava