Command Help
#2

pawn Код:
CMD:respawnv(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_NICERED,SEM_NIVEL);
    new bool:vehicleused[MAX_VEHICLES];
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
        {
            vehicleused[GetPlayerVehicleID(i)] = true;
        }
    }
    for(new i=1; i < MAX_VEHICLES; i++)
    {
        if(!vehicleused[i])
        {
            SetVehicleToRespawn(i);
        }
    }
    new msg[128];
    new pName[MAX_PLAYER_NAME]; //---- ADDED
    GetPlayerName(playerid, pName, sizeof(pName)); ///---- ADDED
    format(msg, sizeof(msg), "Admin %s (%d) has respawned all unused vehicles", pName, playerid); //----- Changed pName
    SendClientMessageToAll(COLOR_YELLOW, msg);
    return 1;
}
Reply


Messages In This Thread
Command Help - by DaYviSoN - 06.05.2014, 15:48
Re: Command Help - by Nathan_Taylor - 06.05.2014, 15:55
Re: Command Help - by Sojo12 - 06.05.2014, 15:56
Re: Command Help - by saikumar - 06.05.2014, 15:59
Re: Command Help - by Konstantinos - 06.05.2014, 16:00
Re: Command Help - by DaYviSoN - 06.05.2014, 16:04

Forum Jump:


Users browsing this thread: 1 Guest(s)