how do i - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how do i (
/showthread.php?tid=111135)
how do i -
[SW]thekillaer - 29.11.2009
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
Re: how do i -
miokie - 29.11.2009
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.
Re: how do i -
[SW]thekillaer - 29.11.2009
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
Re: how do i -
[SW]thekillaer - 29.11.2009
woops meant to modify