Respawn all cars
#3

I said sent you in PM use this one:
PHP код:
#include <a_samp> 

public OnPlayerCommandText(playerid,cmdtext[]) 

    if(
strcmp("/respawncars",cmdtext,true) == 0
    { 
        if(
IsPlayerAdmin(playerid)) 
        { 
            for(new 
iPlayer;iPlayer<MAX_PLAYERS;iPlayer++) 
            if(
IsPlayerInAnyVehicle(iPlayer) == 1
            { 
                
RemovePlayerFromVehicle(iPlayer); 
                for(new 
i;i<MAX_VEHICLES;i++) 
                
SetVehicleToRespawn(i); 
                return 
1
            } 
            for(new 
iPlayer;iPlayer<MAX_PLAYERS;iPlayer++) 
            if(
IsPlayerInAnyVehicle(iPlayer) == 0
            { 
                for(new 
i;i<MAX_VEHICLES;i++) 
                
SetVehicleToRespawn(i); 
                return 
0
            } 
            return 
1
        } 
        return 
1
    } 
    return 
0

Reply


Messages In This Thread
Respawn all cars - by SydonaiCZ - 13.07.2011, 09:36
Re: Respawn all cars - by LetsOWN[PL] - 13.07.2011, 09:40
Re: Respawn all cars - by [MG]Dimi - 13.07.2011, 09:55

Forum Jump:


Users browsing this thread: 1 Guest(s)