21.03.2010, 17:17
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
if(strcmp("/respawn",cmdtext,true) == 0){
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
return 1;
}
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;
}
}
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;
}