12.04.2014, 15:02
Some of my friends want a command for admin like that invisible car So, I tried to create and made a command for admins /inviscar I hope You All Like it
Note:This Command will only work with zcmd :
Please +rep me if you like it
Note:This Command will only work with zcmd :
PHP код:
new ActivateInvisible[MAX_PLAYERS];
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(ActivateInvisible[playerid] == 1)
{
LinkVehicleToInterior(vehicleid,0);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
}
return 1;
}
CMD:inviscar(playerid, params[])
{
if(Player[playerid][pAdmin] >= 3)
if(ActivateInvisible[playerid] == 0)
{
GameTextForPlayer(playerid, "~g~Invisible vehicle:~y~ON!", 3000 ,3);
ActivateInvisible[playerid] = 1;
if(IsPlayerInAnyVehicle(playerid))
{
new VehiculeID = GetPlayerVehicleID(playerid);
LinkVehicleToInterior(VehiculeID,50);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
}
}
else
{
GameTextForPlayer(playerid, "~g~Invisible vehicle:~r~OFF", 3000 ,3);
ActivateInvisible[playerid] = 0;
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
if(IsPlayerInAnyVehicle(playerid))
{
new VehiculeID = GetPlayerVehicleID(playerid);
LinkVehicleToInterior(VehiculeID,0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You need level 3 admin to use this cmd!");
}
}
return 1;
}