Help with spawning a car and destroing it after spawning another car
#1

i need some script with command like /bike to spawn a bike and destroying it when i spawn another bike.
I have a classic command that spawn bike and put me in bike but when a spawn bike next time that last bike
stay in server so that can crash server, so if you have some script that correct my problems thanks, i hope so you will post it here
Reply
#2

There's a simple fix for that, not sure why this problem keeps coming up for people.

At the top of the script:
pawn Код:
new PlayerBike[MAX_PLAYERS];
In the command
[pawn]if(!strcmp(cmdtext[1],"bike",true))
{
if(PlayerBike[playerid])DestroyVehicle(PlayerBike[playerid])
new Float,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
PlayerBike[playerid]=CreateVehicle(522,x,y,z,-1,-1,900); //15 minute respawn delay
PutPlayerInVehicle(playerid,PlayerBike[playerid],0);
return 1;
}
Reply
#3

Thanks, this will realy help...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)