Respawning Cars
#3

pawn Код:
#define check_player_in_car true//make false if you not want to check player
CMD:respawncar(playerid, params[]) {
    if(isnull(params)) {
        SendClientMessage(playerid, 0xFFFFFFFFF, "/respawncar [id]");
        return 1;
    }
    if (params == INVALID_VEHICLE_ID ) return SendClientMessage( playerid, COLOR_RED, "ERROR: Invalid vehicle ID." );
    #if check_player_in_car == true
    for(new i=0; i<MAX_PLAYERS; i++){
    if(IsPlayerInVehicle(i, params))
    {
        SendClientMessage(playerid,0xFFFFFFFFF,"There is a player in vehicle");
        return 1;
    }
    }
    #endif
    SetVehicleToRespawn(params);
    SendClientMessage(playerid,0xFFFFFFFFF,"Vehicle is Respawned");
    return 1;
}
I use ZCMD you can use yours
Reply


Messages In This Thread
Respawning Cars - by fuem1907 - 07.07.2012, 07:28
Re: Respawning Cars - by Jarnu - 07.07.2012, 07:46
Re: Respawning Cars - by MA_proking - 07.07.2012, 07:46
Re: Respawning Cars - by fuem1907 - 07.07.2012, 07:49
Re: Respawning Cars - by [MM]RoXoR[FS] - 07.07.2012, 07:53

Forum Jump:


Users browsing this thread: 1 Guest(s)