Car Respawner - 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: Car Respawner (
/showthread.php?tid=135734)
Car Respawner -
Anthony_Lloyd101 - 21.03.2010
Hello everyone i need some help. I want to make a car re spawner for the admins but i`m not sure of tha code i`m suppose to put. Can someone please help me here
Re: Car Respawner -
Kurence - 21.03.2010
Add this under OnPlayerCommandText
pawn Код:
if(strcmp("/respawn",cmdtext,true) == 0){
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
return 1;
}
Re: Car Respawner -
Anthony_Lloyd101 - 21.03.2010
That didn`t work. I put it in the script compiled it, Compiled nicely without errors and warnings tried the commands and nothing respawned.
Re: Car Respawner -
Anthony_Lloyd101 - 21.03.2010
BUMP! ^ Please help me. I can`t stand cars all over the place
Re: Car Respawner -
oggylt - 22.03.2010
Maybe try stiing into a car?
Re: Car Respawner -
Fedee! - 22.03.2010
pawn Код:
if(strcmp("/respawn",cmdtext,true) == 0)
{
for(new i=0; i<MAX_VEHICLES; i++)
{
SetVehicleToRespawn(i);
SendClientMessage(playerid, 0x00FF00AA, "Vehicles respawned by admin!");
return 1;
}
}
There..
Re: Car Respawner -
MaykoX - 22.03.2010
pawn Код:
if(strcmp(cmdtext, "/respawncars", true) == 0)
{
if (IsPlayerAdmin(playerid)) // This will check if player is admin..
{
for(new i=0;i<MAX_VEHICLES;i++)
{
if(IsVehicleOccupied(i) == 0) // If no one isn't in car
{
SetVehicleToRespawn(i); //will set vehicle to respawn
}
}
SendClientMessageToAll(COLOR_GREY, "All vehicles respawned succesfully by Admin!"); // Send client message to all
}
else
{
SendClientMessage(playerid,COLOR_GREY, "You are not allowed to use this command!"); // You will get this if you're not an admin (Rcon one
}
return 1;
}