#1

Well, I want to make a new thing in my script. I want that when player spawns, the script will make a vehicle and put him inside of it. How to do this? This is when dies too.
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
    new sVehicle,
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, angle);
    sVehicle = CreateVehicle(411, x, y, z, angle, 6, 6, 60);
    return PutPlayerInVehicle(playerid, sVehicle, 0);
}
Reply
#3

Hm thanks I will try it

BUmp
C:\Users\Maki\Desktop\server 0.3d\gamemodes\Tank DM.pwn(104) : error 017: undefined symbol "x"
C:\Users\Maki\Desktop\server 0.3d\gamemodes\Tank DM.pwn(105) : error 017: undefined symbol "angle"
C:\Users\Maki\Desktop\server 0.3d\gamemodes\Tank DM.pwn(106) : error 017: undefined symbol "x"
Reply
#4

Sorry!
pawn Код:
public OnPlayerSpawn(playerid)
{
    new sVehicle, Float:x, Float:y, Float:z, Float:angle;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, angle);
    sVehicle = CreateVehicle(411, x, y, z, angle, 6, 6, 60);
    return PutPlayerInVehicle(playerid, sVehicle, 0);
}
Reply
#5

Thanks mate, this works.
Reply
#6

But how to make that when he dies his vehicle dies too?
Reply
#7

Don't double post, there is Edit Button for this.
Can you explain what you mean. Do you want when player dies the vehicle does what?
Reply
#8

Try:
pawn Код:
DestroyVehicle(sVehicle);
https://sampwiki.blast.hk/wiki/DestroyVehicle
Reply
#9

Thanks, and sorry for double posting.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)