Spedo - Cmd [Rep+] - 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)
+--- Thread: Spedo - Cmd [Rep+] (
/showthread.php?tid=386790)
Spedo - Cmd [Rep+] -
virusa1 - 21.10.2012
Hello all!
I need a speedometer and cmd witch respawn all unused cars.
thanx!
Re: Spedo - Cmd [Rep+] -
Gamer_007 - 22.10.2012
Plz any mod move this topic to Script Request
Re: Spedo - Cmd [Rep+] -
[HK]Ryder[AN] - 22.10.2012
Quote:
Originally Posted by Gamer_007
Plz any mod move this topic to Script Request
|
Mods will do what they feel is correct. You do not have to post it.
OT - Code for respawning all unused cars
1.paste this stock out of any callback
PHP код:
stock IsVehicleOccupied(vehicleid) // Returns 1 if there is anyone in the vehicle
{
for(new i=0;i<MAX_PLAYERS;i++;)
{
if(IsPlayerInAnyVehicle(i))
{
if(GetPlayerVehicleID(i)==vehicleid)
{
return 1;
}
else
{
return 0;
}
}
}
return 1;
}
2. Heres the command(in ZCMD)
PHP код:
CMD:respawncars(playerid, params[])
{
for(new i=0; i<MAX_VEHICLES; i++)
{
if(!IsVehicleOccupied(i))
{
DestroyVehicle(i);
}
}
return 1;
}
You must have basic knowledge of what stocks are and where to put them
For the speedometer.
Click
Here