Respawn all
#1

It doesnt respawn any vehicles... ? Help please

pawn Код:
if(strcmp(cmd, "/respawnall", true) == 0)
{
if(gAdminOnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!");
return 1;
}
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 6 && PlayerInfo[playerid][pRealAdmin] == 1)
{
for(new v=0;v<MAX_VEHICLES;v++)
{
if(!CarHasPlayer(v))
{
SetVehicleToRespawn(v);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmCmd: %s has respawned all unoccupied vehicles",sendername);
SendClientMessageToAll(COLOR_ADMIN, string);
return 1;
}
}
}
}
Reply
#2

Bump
Reply
#3

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
It doesnt respawn any vehicles... ? Help please

pawn Код:
if(strcmp(cmd, "/respawnall", true) == 0)
{
if(gAdminOnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!");
return 1;
}
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 6 && PlayerInfo[playerid][pRealAdmin] == 1)
{
for(new v=0;v<MAX_VEHICLES;v++)
{
if(!CarHasPlayer(v))
{
SetVehicleToRespawn(v);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "AdmCmd: %s has respawned all unoccupied vehicles",sendername);
SendClientMessageToAll(COLOR_ADMIN, string);
return 1;
}
}
}
}
WTF your stealing Baylers work
Reply
#4

Oh yea thats really baylers script.. fucking idiot.
Reply
#5

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Oh yea thats really baylers script.. fucking idiot.
Fucking idiot?mind your language you fucking kid
Reply
#6

LOL,

pawn Код:
stock RespawnAllCars()
{
 new unoccupied[MAX_VEHICLES-1];
 for(new i=0; i<MAX_PLAYERS; i++)
 {
  if(IsPlayerInAnyVehicle(i)) unoccupied[GetPlayerVehicleID(i)] = 1;
 }
 
 for(new car = 1; car<(MAX_VEHICLES-1); car++)
 {
  if(unoccupied[car] == 0) SetVehicleToRespawn(car);
 }
}
Function found at http://forum.sa-mp.com/index.php?topic=61574.960


pawn Код:
if(strcmp(cmd, "/respawnall", true) == 0)
{
 if(gAdminOnDuty[playerid] != 1) return SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!");

 if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 6 && PlayerInfo[playerid][pRealAdmin] == 1)
 {
  RespawnAllCars();
 }
 return 1;
}
You get the idea.
Reply


Forum Jump:


Users browsing this thread: