how do i
#1

how do i make a kind of debug command

so my users can do /v hydra or something like that and it automatically puts them inside of a hydra

ive tryed debug scripts but all of them allow users to spawn more then one vehicle i wanna make it so that they can only spawn 1 vehicle at a time and when they spawn a new vehicle the old one gets deleted
Reply
#2

Just make a check for each player with a simple array, when the player has typed the command in Check if the array = 1, if it dosen't Set it to 1 and spawn the vehicle.

Example:
At the top of yoru script:
pawn Код:
new HasSpawnedCar[MAX_PLAYERS];
In yoru command:
pawn Код:
if(HasSpawnedCar[playerid] == 0)
{
HasSpawnedCar[playerid] = 1;
//Spawn the vehicle here..
}
else
{
SendClientMessage(playerid,COLOR," You have already spawned a vehicle!");
}
I hope you understand what I mean.
Reply
#3

i cant find a good /v that i could use could u help me find one?


edit also that wouldnt work because then people would be able to spawn a different car i want it so player can spawn any car he wants so once he spawns a hydra but hes bored with it he can use a different vehicle and the hydra gets deleted
Reply
#4

woops meant to modify
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)