05.03.2013, 18:03
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.
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);
}