lil help
#1

pawn Код:
if(listitem == 6)
        {
            new Float:Pos[3];
            GetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
            CreateVehicle(541,Pos[0]+1,Pos[1]+2,Pos[2],0,-1,-1,99999999);
            SendClientMessage(playerid,0xFF9900AA,"You had spawned an Bullet!");
            PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);
        }
when i spawn vehicle, it spawns beside me. how i make if i spawn it, i will be inside vehicle??
Reply
#2

pawn Код:
if(listitem == 6)
{
    new Float:Pos[3];
    GetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
    new ID = CreateVehicle(541,Pos[0]+1,Pos[1]+2,Pos[2],0,-1,-1,99999999);
    SendClientMessage(playerid,0xFF9900AA,"You have spawned an Bullet!");
    PutPlayerInVehicle(playerid,ID,0);
}
Should work.
Reply
#3

little question, how can i make the old vehiclle disappear
Reply
#4

help pls
Reply
#5

Quote:
Originally Posted by tanush
Посмотреть сообщение
little question, how can i make the old vehiclle disappear
pawn Код:
if(listitem == 6)
{
    new Float:Pos[3], cID;
    cID = GetPlayerVehicleID(playerid);
    DestroyVehicle(cID);
    GetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
    new ID = CreateVehicle(541,Pos[0]+1,Pos[1]+2,Pos[2],0,-1,-1,99999999);
    SendClientMessage(playerid,0xFF9900AA,"You have spawned an Bullet!");
    PutPlayerInVehicle(playerid,ID,0);
}
Reply
#6

it wont destroy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)