need help on setting players interior from 0 to 12 every 0.4 seconds...
#1

Hi....

top
pawn Code:
forward objectreload();

gamemodeinit
pawn Code:
SetTimer("objectreload", 400, 1);


public objectreload
pawn Code:
public objectreload()
{
  ........
}


i dont know what to put in the public and i want it so the player interior and the vehicle interior is set to 12 then right back to 0 over and over again..... and also that it's instant so the player doesnt really notice this..

..the reason is if you do this you wont get the invisible object bug....
Reply
#2

pawn Code:
public objectreload()
{
    if(GetPlayerInterior(playerid) == 12) return SetPlayerInterior(playerid,0);
    SetPlayerInterior(playerid,GetPlayerInterior(playerid)+1);
    return 1;
}
Reply
#3

also i want
pawn Code:
LinkVehicleToInterior(vehicle1, [the interior id])
so it doesnt make the car flicker you know...
Reply
#4

Quote:
pawn Code:
public objectreload()
{
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
        if(IsPlayerConnected(playerid))
        if(GetPlayerInterior(playerid) == 12)
            return SetPlayerInterior(playerid,0);
        SetPlayerInterior(playerid,GetPlayerInterior(playerid)+1);
    }
    return 1;
}
also thats a bit weird because it's on interior 12 and goes to 0 then back to 12 again.... i want it the opposite so its on interior 0 and goes to 12 and back to 0 so you can see the original map properly aswell...
Reply
#5

Quote:
Originally Posted by Nathy.SA-MP
View Post
undefined symbol 'playerid'.

pawn Code:
public objectreload()
{
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
        if(IsPlayerConnected(playerid))
        if(GetPlayerInterior(playerid) == 12)
            return SetPlayerInterior(playerid,0);
        SetPlayerInterior(playerid,GetPlayerInterior(playerid)+1);
    }
    return 1;
}
Ups
pawn Code:
public objectreload()
{
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
        if(GetPlayerInterior(playerid) == 12) return SetPlayerInterior(playerid,0);
        SetPlayerInterior(playerid,GetPlayerInterior(playerid)+1);
        if(IsPlayerInAnyVehicle(playerid)) LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(playerid)+1)
    }
    return 1;
}
Reply
#6

Quote:
pawn Code:
public objectreload()
{
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
        if(GetPlayerInterior(playerid) == 12) return SetPlayerInterior(playerid,0);
        SetPlayerInterior(playerid,GetPlayerInterior(playerid)+1);
        if(IsPlayerInAnyVehicle(playerid)) LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(playerid)+1)
    }
    return 1;
}
bug: on normal map it's invisible and goes to interior 0 for like a split second and the car goes invsible for a split second aswell....

isnt their another of fixing the object bug in a timer for example using
pawn Code:
Streamer_Update(playerid);
or either
pawn Code:
Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
Reply
#7

Quote:
Originally Posted by [EDT]AmanSingh123
View Post
bug: on normal map it's invisible and goes to interior 0 for like a split second and the car goes invsible for a split second aswell....

isnt their another of fixing the object bug in a timer for example using
pawn Code:
Streamer_Update(playerid);
or either
pawn Code:
Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
Try:
pawn Code:
public objectreload()
{
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
        SetPlayerInterior(playerid,GetPlayerInterior(playerid)+1);
        if(IsPlayerInAnyVehicle(playerid)) LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(playerid)+1)
    }
    return 1;
}
Reply
#8

Quote:
pawn Code:
public objectreload()
{
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
        SetPlayerInterior(playerid,GetPlayerInterior(playerid)+1);
        if(IsPlayerInAnyVehicle(playerid)) LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(playerid)+1)
    }
    return 1;
}
nope :/
Reply
#9

okay so i changed to fallouts streamer and i want to try this.....
pawn Code:
public objectreload()
{
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
      F_PlayerObjectUpdate(playerid, Float:x, Float:y, Float:z);
    }
    return 1;
}

but i get this error... and dont know how to resolve it.... :/

pawn Code:
error 017: undefined symbol "x"
Reply
#10

pawn Code:
public objectreload()
{
    new Float:x, Float:y, Float:z;
    for(new playerid; playerid < MAX_PLAYERS; ++playerid)
    {
      GetPlayerPos(playerid, x, y, z);
      F_PlayerObjectUpdate(playerid, x, y, z);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)