11.09.2014, 09:04
here is the cmd Gud luck
PHP код:
CMD:givecar(playerid, params[])
{
if(Player[playerid][pAdmin] >= 3)
{
new id;
if(sscanf(params, "u", id))return SendClientMessage(playerid, -1, "[Database]:: /givecar [playerid]");
if(IsPlayerConnected(id))
{
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_KRED, "Invalid Player");
if(IsPlayerInAnyVehicle(id)) SendClientMessage(playerid,0x00FF00AA,"player in a vehicle.");
else
{
new Float:pX,Float:pY,Float:pZ,Float:pw;
GetPlayerPos(id, pX,pY,pZ);
GetPlayerFacingAngle(id, pw);
veh[playerid] = CreateVehicle(541, pX, pY, pZ, pw, 0, 0, 0);
PutPlayerInVehicle(id, veh[playerid], 0);
GameTextForPlayer(id,"~w~Bullet",3000,1);
format(pstring,sizeof(pstring),"Administrator %s Give Car to Player %s ",GetName(playerid),GetName(id));
SendMessageToAdmins(pstring);
}return GameTextForPlayer(id,"~r~Admin Give you Car",3000,1);
}else return SendClientMessage(playerid, COLOR_KRED, "Player is not connected!");
}else return SendClientMessage(playerid, COLOR_KRED, "You need level 3 admin to use this cmd!");
}