Skripta koju koristim: GM od 0
Problem: Napravio sam vozila za organizacije, ali kada igrac ulazi u vozilo, detekcija radi samo za prvu org..
Evo kodovi:
forward IsHitmanKola(carid);
forward IsSaintsKola(carid);
forward IsWCFKola(carid);
forward IsRMKola(carid);
new RMKola[12];
new WCFKola[11];
new HitmanKola[8];
new SaintsKola[11];
public IsWCFKola(carid)
{
for(new i = 0; i < sizeof(WCFKola); i++)
{
if(carid == WCFKola[i]) return 1;
}
return 0;
}
public IsRMKola(carid)
{
for(new i = 0; i < sizeof(RMKola); i++)
{
if(carid == RMKola[i]) return 1;
}
return 0;
}
public IsHitmanKola(carid)
{
for(new i = 0; i < sizeof(HitmanKola); i++)
{
if(carid == HitmanKola[i]) return 1;
}
return 0;
}
public IsSaintsKola(carid)
{
for(new i = 0; i < sizeof(SaintsKola); i ++)
{
if(carid == HitmanKola[i]) return 1;
}
return 0;
}
OnPlayerEnterVehicle:
if(IsWCFKola(vehicleid))
{
if(PlayerInfo[playerid][pLider] !=8 && PlayerInfo[playerid][pOrg] != 8 ) return GameTextForPlayer(playerid, "~r~Zakljucano! ~y~WCF", 2000, 5), GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]), SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
}
else if(IsRMKola(vehicleid))
{
if(PlayerInfo[playerid][pLider] !=7 && PlayerInfo[playerid][pOrg] != 7 ) return GameTextForPlayer(playerid, "~r~Zakljucano! ~r~RM", 2000, 5), GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]), SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
}
else if(IsSaintsKola(vehicleid))
{
if(PlayerInfo[playerid][pLider] !=6 && PlayerInfo[playerid][pOrg] != 6 ) return GameTextForPlayer(playerid, "~r~Zakljucano! ~p~SR", 2000, 5), GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]), SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
}
else if(IsHitmanKola(vehicleid))
{
if(PlayerInfo[playerid][pLider] !=5 && PlayerInfo[playerid][pOrg] != 5 ) return GameTextForPlayer(playerid, "~r~Zakljucano! ~w~Hitman", 2000, 5), GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]), SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
}
BUMP! Pomozite!
Citat: Frenci poslato April 05, 2012, 18:40:16 POSLE PODNE
uzmi jednostavno iz nekog dugog game moda pa malo si editiraj
De bogati nepametuj pomozi ako znas ako neznas ne spamaj bezveze.
umesto publcia koristi stock, to je prvo drugo objasni malo bolje sta ti tacno neradi... ujendo naso sam ti gresku
PlayerInfo[playerid][pLider] !=8 && PlayerInfo[playerid][pOrg] != 8
to znaci da igrac mora da bude i lider i ujendo clan, sto znaci da obicni clanovi org nebi mogli da voze vozilo, tako da moras koristiti
PlayerInfo[playerid][pLider] !=8 || PlayerInfo[playerid][pOrg] != 8
Ne radi mi to sto mogu uci u vozilo org iako nisam u toj org.. ali detekcija radi samo za prvu org koju sam stavio(wcf), kad tu udjem pise Zakljucano! WCF, a ostalo udjem bez problema
nemoj da koristis else, ostavi smao sa if(bla bla bla
mada neverujem da ce to pomoci