Give all players a car?
#1

I'm using LuxAdmin, i notice it has a similar command to only give 1 specific player a car, but how do i automatically give everyone a car?

This is what LuxAdmin has, so please configure it and make it put EVERYONE into a car.

pawn Код:
dcmd_givecar(playerid,params[])
{
    if(AccInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid))
    {
        if(!strlen(params)) return
        SendClientMessage(playerid, LIGHTBLUE2, "Usage: /givecar [PlayerID]") &&
        SendClientMessage(playerid, orange, "Function: Will give a Car for specified player");
        new player1 = strval(params);
        new string[128];
        new playername[MAX_PLAYER_NAME];
        new adminname[MAX_PLAYER_NAME];
        if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
        return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
        if(IsPlayerInAnyVehicle(player1))
        return SendClientMessage(playerid,red,"ERROR: Player already has a vehicle");
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
         {
            SendCommandToAdmins(playerid,"GiveCar");
            new Float:x, Float:y, Float:z;
            GetPlayerPos(player1,x,y,z);
            CarSpawner(player1,415);
            GetPlayerName(player1, playername, sizeof(playername));
            GetPlayerName(playerid, adminname, sizeof(adminname));
            format(string,sizeof(string),"|- Administrator %s has given you a car",adminname);
            SendClientMessage(player1,blue,string);
            format(string,sizeof(string),"You have given %s a car", playername);
            return SendClientMessage(playerid,BlueMsg,string);
        }
        else return ErrorMessages(playerid, 4);
    }
    else return ErrorMessages(playerid, 1);
}
Reply


Messages In This Thread
Give all players a car? - by Eminem 2ka9 - 05.03.2013, 18:03
Re: Give all players a car? - by LetsOWN[PL] - 05.03.2013, 18:12
Re: Give all players a car? - by Eminem 2ka9 - 05.03.2013, 18:20
Re: Give all players a car? - by LetsOWN[PL] - 05.03.2013, 18:28
Re: Give all players a car? - by Eminem 2ka9 - 05.03.2013, 18:30
Re: Give all players a car? - by tyler12 - 05.03.2013, 18:53

Forum Jump:


Users browsing this thread: 2 Guest(s)