03.07.2015, 04:04
Hey Guyz.I need help.
I have /adminduty command and i want to add that,When a play with admin duty on sits in any vehicle,his car's health should be unlimited i mean ( It should be GODCAR ) and secondly,When he turns on /adminduty,His nick BAR should be removed.Here is the command:
I have /adminduty command and i want to add that,When a play with admin duty on sits in any vehicle,his car's health should be unlimited i mean ( It should be GODCAR ) and secondly,When he turns on /adminduty,His nick BAR should be removed.Here is the command:
PHP код:
COMMAND:adminduty(playerid, params[])
{
if(PlayerInfo[playerid][pSpawned] == 1)
{
if(PlayerInfo[playerid][pAdminlevel] > 0)
{
if(AdminDuty[playerid] == 1)
{
SetPlayerSkin(playerid,OldSkin[playerid]);
SendClientMessage(playerid,COLOR_ADMIN,"ADMIN Action: Admin Duty Is Now OFF.");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerColor(playerid, COLOR_WHITE);
GivePlayerCommonWeapons(playerid);
AdminDuty[playerid] = 0;
}else{
OldSkin[playerid] = GetPlayerSkin(playerid);
SendClientMessage(playerid,COLOR_ADMIN,"ADMIN Action: Admin Duty Is Now ON.");
SetPlayerHealth(playerid,1000000);
SetPlayerArmour(playerid,1000000);
SetPlayerWantedLevel(playerid, 0);
GivePlayerWeapon(playerid,16,100000);
GivePlayerWeapon(playerid,44,100000);
GivePlayerWeapon(playerid,41,100000);
GivePlayerWeapon(playerid,24,100000);
GivePlayerWeapon(playerid,26,100000);
GivePlayerWeapon(playerid,38,100000);
GivePlayerWeapon(playerid,18,100000);
GivePlayerWeapon(playerid,28,100000);
GivePlayerWeapon(playerid,43,100000);
GivePlayerWeapon(playerid,34,100000);
GivePlayerWeapon(playerid,31,100000);
AdminDuty[playerid] = 1;
}
}else{
SendClientMessage(playerid,COLOR_ERROR,""ERROR_MSG"");
}
}else{
SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command WHile You're Dead.");
}
return 1;
}