Need help with a script
#9

Well try this one:

pawn Код:
COMMAND:rc(playerid,params[])
{
    new sendername[24], string[128];
    if(APlayerData[playerid][PlayerLevel] < 1) return SendClientMessage(playerid, 0xFF0000FF, "You are not authorized to use that command!");
    for(new car = 1; car <= 268; car++)
    {
        if(IsVehicleEmpty(car)) SetVehicleToRespawn(car);
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
    SendClientMessageToAll(0xFFFFFFFF,string);
    return 1;
}

stock IsVehicleEmpty(vehicleid)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerInVehicle(i, vehicleid)) return 0;
    }
    return 1;
}
Reply


Messages In This Thread
Need help with a script - by thegamer355 - 02.01.2014, 06:15
Re: Need help with a script - by nrg700 - 02.01.2014, 06:16
Re: Need help with a script - by iOxide - 02.01.2014, 06:27
Re: Need help with a script - by thegamer355 - 02.01.2014, 06:41
Re: Need help with a script - by HK - 02.01.2014, 06:42
Re: Need help with a script - by KingHual - 02.01.2014, 06:43
Re: Need help with a script - by iOxide - 02.01.2014, 06:46
Re: Need help with a script - by thegamer355 - 02.01.2014, 06:47
Re: Need help with a script - by iOxide - 02.01.2014, 06:52
Re: Need help with a script - by thegamer355 - 02.01.2014, 06:59

Forum Jump:


Users browsing this thread: 2 Guest(s)