Need help with a string
#1

pawn Код:
CMD:respawnallcars(playerid)
{
    new string[128];
    if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 2)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to do this!");
                return 1;
            }
            new bool:unwanted[MAX_VEHICLES];
            for(new player=0; player<MAX_PLAYERS; player++)
            {
                if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
            }
            for(new car = 1; car <= MAX_VEHICLES; car++)
            {
                if(!unwanted[car]) SetVehicleToRespawn(car);
            }
            format(string, sizeof(string), "SERVER: All unused cars were respawned by %s", sendername);
            SendClientMessageToAll(COLOR_YELLOW, string);
        }
    return 1;
}
The command works but the string doesn't send, help please
Reply


Messages In This Thread
Need help with a string - by Jing_Chan - 17.12.2014, 16:26
Re: Need help with a string - by Misiur - 17.12.2014, 16:37
Re: Need help with a string - by Jing_Chan - 17.12.2014, 17:15
Re: Need help with a string - by Misiur - 17.12.2014, 17:32

Forum Jump:


Users browsing this thread: 1 Guest(s)