Skripta koju koristim:Street Stories
Detaljan opis problema:Evo ovako...Kada kupim kucu i udjem u nju normalno radi /enter i /exit...A kada ja idem off i relog meni uopce nece izaci iz kuce...Kako da popravim
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Nemoguce da ne moze ;)
Pokusaj sa raznih pozicija da kucas /exit
Jesam pokusaj ti pa ce vidjet
Citat: Razer poslato Jul 01, 2011, 18:28:08 POSLE PODNE
Nemoguce da ne moze ;)
Pokusaj sa raznih pozicija da kucas /exit
nije upravu je decko..najveci bug do sad nikko nije resio na BS forumu...nema sanse da se izadje kad se ode relog :)
Jel mogu umjesto da mi se spawna u kuci,da mi se spawna ispred kuce?
Citat: [CL]Cooper poslato Jul 01, 2011, 18:26:56 POSLE PODNE
Skripta koju koristim:Street Stories
Detaljan opis problema:Evo ovako...Kada kupim kucu i udjem u nju normalno radi /enter i /exit...A kada ja idem off i relog meni uopce nece izaci iz kuce...Kako da popravim
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
To se i meni dogaÄ'a na tom modu... Kad uÄ'em s /enter uÄ'e,ali kad napravim /gmx ili odem relog ne mogu izaci..
Daj ti kod od /enter... da provjerimo varijablu
Vidio sam na nekim serw... da kada on dodje online ne spawna se u kuci nego izvan nje tj ispred vrata pa me zanima kako da ja to napravim ?
daj ti kod od enter da ti to sredim, znam sta je problem...
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Dobrodosli kuci", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
HouseEntered[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Zakljucano", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
if(!IsACop(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, " Samo policajci !");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Zatvoreno", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
return 1;
}
SafeGivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~ukucajte /exit~n~da izadjete", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s je platio $%d da udje u biznis %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
}
else
{
GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Zatvoreno", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Sad mozete da ucestvujete u karting trci ,uzmite karting.");
}
else
{
return 1;
}
SafeGivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s je platio $%d da udjete u Sbiz %d", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Nemate novca", 5000, 1);
}
}
}
if(PlayerToPoint(3.0, playerid,1419.6383,-1623.6034,13.5469))
{
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, 246.375991,109.245994,1003.218750);
PlayerInfo[playerid][pInt] = 10;
}
if(PlayerToPoint(3.0, playerid,1462.3124,-1011.2427,26.8438))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 2315.952880,-1.618174,26.742187);
PlayerInfo[playerid][pInt] = 0;
}
if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Dobrodosli na 8Ball stazu", 5000, 1);
SetPlayerInterior(playerid,7);
PlayerInfo[playerid][pInt] = 7;
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Dobrodosli na Prasnjavu stazu", 5000, 1);
SetPlayerInterior(playerid,4);
PlayerInfo[playerid][pInt] = 4;
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Dobrodosli na stazu za stunt", 5000, 1);
SetPlayerInterior(playerid,14);
PlayerInfo[playerid][pInt] = 14;
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
else if (PlayerToPoint(4, playerid,2073.2979,-1831.1228,13.5469))
{ // Pay & Spray
if(GetPlayerState(playerid) == 2)
{
if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
{
if(SBizzInfo[5][sbProducts] > 0)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2062.1294,-1831.5498,13.5469);
SetVehicleZAngle(tmpcar, 90);
SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
SBizzInfo[5][sbProducts]--;
SetTimerEx("AfterSpray1", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemate dovoljno novca da udjete u Pay & Spray.");
}
}
}
else if (PlayerToPoint(4, playerid,1024.9756,-1030.7930,32.0257))
{ // Pay & Spray
if(GetPlayerState(playerid) == 2)
{
if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
{
if(SBizzInfo[5][sbProducts] > 0)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1024.9763,-1021.8850,32.1016);
SetVehicleZAngle(tmpcar, 0);
SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
SBizzInfo[5][sbProducts]--;
SetTimerEx("AfterSpray2", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Memate dovoljno novca da udjete u Pay & Spray.");
}
}
}
else if (PlayerToPoint(4, playerid,488.3819,-1733.0563,11.1752))
{ // Pay & Spray
if(GetPlayerState(playerid) == 2)
{
if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
{
if(SBizzInfo[5][sbProducts] > 0)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 487.4099,-1741.4585,11.1330);
SetVehicleZAngle(tmpcar, 180);
SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
SBizzInfo[5][sbProducts]--;
SetTimerEx("AfterSpray3", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Memate dovoljno novca da udjete u Pay & Spray.");
}
}
}
else if (PlayerToPoint(4, playerid,719.8940,-464.8272,16.3359))
{ // Pay & Spray
if(GetPlayerState(playerid) == 2)
{
if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
{
if(SBizzInfo[5][sbProducts] > 0)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 720.3924,-456.0286,16.3359);
SetVehicleZAngle(tmpcar, 0);
SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
SBizzInfo[5][sbProducts]--;
SetTimerEx("AfterSpray4", 5000, false, "i", playerid);
}
else
{
GameTextForPlayer(playerid, "~r~Rasprodato", 5000, 1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Memate dovoljno novca da udjete u Pay & Spray.");
}
}
}
}
return 1;
}
Moderator : Stavljaj komande u
Stavi gdje ti se spawna na public SetPlayerSpawn(playerid)
ovo:
HouseEntered[playerid] = PlayerInfo[playerid][pPhousekey];
i to je to...
Prije svega vi u gamemodu nemate komandu EXIT
evo vam je :
CMD:exit(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo<i>[hExitx], HouseInfo<i>[hExity], HouseInfo<i>[hExitz]))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo<i>[hEntrancex],HouseInfo<i>[hEntrancey],HouseInfo<i>[hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pHouseEntered] = 0;
PlayerInfo[playerid][pLocal] = i;
PlayerInfo[playerid][pVW] = i;
SetPlayerVirtualWorld(playerid,0);
}
}
}
}</i></i></i></i></i></i>
Ne mozete reci d ne radi jer tu ja koristim
http://balkan-samp.com/forum/index.php?topic=25957.0
Citat: [A]Ricky poslato Jul 02, 2011, 14:44:58 POSLE PODNE
Prije svega vi u gamemodu nemate komandu EXIT
evo vam je :
CMD:exit(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo<i>[hExitx], HouseInfo<i>[hExity], HouseInfo<i>[hExitz]))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo<i>[hEntrancex],HouseInfo<i>[hEntrancey],HouseInfo<i>[hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pHouseEntered] = 0;
PlayerInfo[playerid][pLocal] = i;
PlayerInfo[playerid][pVW] = i;
SetPlayerVirtualWorld(playerid,0);
}
}
}
}</i></i></i></i></i></i>
Ne mozete reci d ne radi jer tu ja koristim
http://balkan-samp.com/forum/index.php?topic=25957.0
Ne priÄaj gluposti :SS
JA kad doÄ'em pred kuću, uÄ'em u nju i MOGUUUUUU izaci van,alii kad se spawnam u kući NE MOGU izaci van...
da zna li iko kako da se spawna ispred kuce ? :D
Problem je rijesen ljudi, a Eazy_Eye, na SetPlayerSpawn callbacku stavi umjesto koordinata inta koordinate exterijera...
Jel mi moze netko pomoc kako da sravim kada netko ima kucu da se spawna ispred a ne u njoj