[Pomoc]auto

Započeo 𝓒𝓪𝓼𝓮𝔂, Maj 05, 2013, 23:17:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

probaj stavit, po onplayerstatechange
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!

pax95

Citat: Crazyn3ss poslato Maj 06, 2013, 16:33:59 POSLE PODNE
probaj stavit, po onplayerstatechange
Ako bi stavio pod onplayerstatechange i jos stavio STATE_DRIVER onda bi mu to slalo nonstop dok vozi kola. Mora raditi pod OnPlayerEnterVehicle jedino ako si stavio u neki uslov i zato ne radi


public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(gTeam[playerid] >= 1||gTeam[playerid] >= 3||gTeam[playerid] >= 4)
{
if (IsACopCar(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pLeader]==11||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pMember]==11) {}
else
{
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
JBC_SetPlayerPos(playerid, cx,  cy, cz);
}
}
if (IsNpcVehicle(vehicleid) && !ispassenger)
{
    if(PlayerInfo[playerid][pLeader]==100) {}
    else {
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
JBC_SetPlayerPos(playerid, cx,  cy, cz);
}
}
if (IsAnAmbulance(vehicleid) && !ispassenger)
{
    if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
    else
{
WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Kradja vozila hitne pomoci!"); }
}
        if (IsABike(vehicleid) && !ispassenger)
{
SCM(playerid,COLOR_GRAD1,"{F4630B}[INFO] {ffffff}Da stavite kacigu kucajte /kaciga !");
        }
if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
{
    if(PlayerInfo[playerid][pAdmin] >= 1337 && AdminDuty[playerid] == 1) { }
    else
    {
    new Float:cx, Float:cy, Float:cz;
    GetPlayerPos(playerid, cx, cy, cz);
    JBC_SetPlayerPos(playerid, cx, cy, cz);
}
}
}
return 1;
}




    new sendername[MAX_PLAYER_NAME], stper[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(stper, sizeof(stper), "* %s ulazi u auto.", sendername);
    ProxDetector(20.0, playerid, stper, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);


ae stavite mi vi
Heaven Community [IN PROGRESS]

pax95

Probaj:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new sendername[MAX_PLAYER_NAME], stper[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
format(stper, sizeof(stper), "* %s ulazi u auto.", sendername);
    ProxDetector(20.0, playerid, stper, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
if(gTeam[playerid] >= 1||gTeam[playerid] >= 3||gTeam[playerid] >= 4)
{
if (IsACopCar(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pLeader]==11||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pMember]==11) {}
else
{
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
JBC_SetPlayerPos(playerid, cx,  cy, cz);
}
}
if (IsNpcVehicle(vehicleid) && !ispassenger)
{
    if(PlayerInfo[playerid][pLeader]==100) {}
    else {
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
JBC_SetPlayerPos(playerid, cx,  cy, cz);
}
}
if (IsAnAmbulance(vehicleid) && !ispassenger)
{
    if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
    else
{
WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Kradja vozila hitne pomoci!"); }
}
        if (IsABike(vehicleid) && !ispassenger)
{
SCM(playerid,COLOR_GRAD1,"{F4630B}[INFO] {ffffff}Da stavite kacigu kucajte /kaciga !");
        }
if(IsAnOwnableCar(vehicleid) && CarInfo[vehicleid][cLock] == 1 && CarInfo[vehicleid][cOwned] == 1)
{
    if(PlayerInfo[playerid][pAdmin] >= 1337 && AdminDuty[playerid] == 1) { }
    else
    {
    new Float:cx, Float:cy, Float:cz;
    GetPlayerPos(playerid, cx, cy, cz);
    JBC_SetPlayerPos(playerid, cx, cy, cz);
}
}
}
return 1;
}

hvala lock radi
Heaven Community [IN PROGRESS]