Problem with car respawn
#1

here is the command:
PHP код:
     if(strcmp(cmd"/respawnallcars"true) == || strcmp(cmd"/rac"true) == 0// by MK
    
{
      if(
IsPlayerConnected(playerid))
      {
        if(
PlayerInfo[playerid][pAdmin] < 3)
            {
              
SendClientMessage(playeridCOLOR_GRAD1"  you are not authorized to use that command!");
              return 
1;
            }
            new 
bool:unwanted[CAR_AMOUNT];
            for(new 
player=0player<MAX_PLAYERSplayer++)
           {
          if(
IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
           }
      for(new 
car 1car <= 268car++)
            {
                if(!
unwanted[car]) SetVehicleToRespawn(car);
            }
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(stringsizeof(string), "SERVER: All unused cars respawned by admin %s."sendername);
            
BroadCast(COLOR_WHITE,string);
        }
        return 
1;
    } 
Reply


Messages In This Thread
Problem with car respawn - by Mark k - 22.10.2009, 19:04
Re: Problem with car respawn - by agusfn20 - 22.10.2009, 19:19
Re: Problem with car respawn - by MB@ - 22.10.2009, 19:21
Re: Problem with car respawn - by Mark k - 22.10.2009, 19:29
Re: Problem with car respawn - by Peter_Corneile - 22.10.2009, 19:32
Re: Problem with car respawn - by Mark k - 22.10.2009, 19:43
Re: Problem with car respawn - by Peter_Corneile - 22.10.2009, 19:43
Re: Problem with car respawn - by Mark k - 22.10.2009, 19:45
Re: Problem with car respawn - by Peter_Corneile - 22.10.2009, 19:47
Re: Problem with car respawn - by Mark k - 22.10.2009, 19:52

Forum Jump:


Users browsing this thread: 1 Guest(s)