29.08.2015, 23:46
Hello Samp Scripters.
i am looking for someone to help me with my adminduty cmds when i go on amdinduty it give me health and armour so no one can kill me but i aint woryied about that as i want it but
after finnishing on admin duty i want to go back playing but i want it to set me back to the team i am in and the Class i chosen so i am looking someone to help me if they would.
Classes
Teams
i am looking for someone to help me with my adminduty cmds when i go on amdinduty it give me health and armour so no one can kill me but i aint woryied about that as i want it but
after finnishing on admin duty i want to go back playing but i want it to set me back to the team i am in and the Class i chosen so i am looking someone to help me if they would.
Код:
CMD:aduty(playerid, params[]) return SendClientMessage(playerid, red,"Changed to /adminduty"); CMD:aoffduty(playerid, params[]) return SendClientMessage(playerid, red,"Changed to /adminduty"); CMD:adminduty(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 1) { if(AntiSK[playerid] == 0) { if(PlayerInfo[playerid][OnDuty] == 0) { PlayerInfo[playerid][OnDuty] = 1; new str[128], AdminName[28]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(str, sizeof(str), "Administrator %s is now on Admin duty!", AdminName); SendClientMessageToAll(0xF600F6FF, str); SetPlayerSkin(playerid,217); SetPlayerTeam(playerid,6); SetVehicleHealth(VID[playerid], 9999999999.0); Duty[playerid] = Create3DTextLabel("On Duty Admin\n!!Do Not Attack!!", 0xF600F6FF, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(Duty[playerid], playerid, 0.0, 0.0, 0.5); SetPlayerColor(playerid, 0xF600F6FF); SetPlayerHealth(playerid, 100000000000); SetPlayerArmour(playerid, 100000000000); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 31,500); Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(DM[playerid], 0xFFFFFFFF, " "); gTeam[playerid] = TEAM_MERC; gClass[playerid] = CLASS; } else if(PlayerInfo[playerid][OnDuty] == 1) { PlayerInfo[playerid][OnDuty] = 0; new str[128], AdminName[28]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(str, sizeof(str), "Administrator %s is now off Admin duty!", AdminName); SendClientMessageToAll(0xFD01FDAA, str); SetPlayerHealth(playerid, 0); Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " "); Update3DTextLabelText(Duty[playerid], 0xFFFFFFFF, " "); ForceClassSelection(playerid); SetPlayerSkin(playerid,265); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); new rand = random(sizeof(PlayerColors)); SetPlayerColor(playerid, PlayerColors[rand]); } } else SendClientMessage(playerid,red,"You can't go when under Antisk"); } else return 0; return 1; }
Код:
if(gClass[playerid] == Assault) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 100); //Deagle GivePlayerWeapon(playerid, 27, 200); //Shotgun GivePlayerWeapon(playerid, 31, 200); //M4 } else if(gClass[playerid] == SNIPER) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 34, 200); //Sniper GivePlayerWeapon(playerid, 23, 200); //Silenced. GivePlayerWeapon(playerid, 4, 1); //Knife. GivePlayerWeapon(playerid, 29, 100); //Knife. //SniperColor(playerid); } else if(gClass[playerid] == PILOT) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 31, 200); //M4 GivePlayerWeapon(playerid, 25, 100); //Shotgun GivePlayerWeapon(playerid, 24, 50); //Deagle } else if(gClass[playerid] == ENGINEER) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 6, 2); //M4 GivePlayerWeapon(playerid, 25, 100); //Shotgun GivePlayerWeapon(playerid, 24, 50); //Deagle GivePlayerWeapon(playerid, 16, 5); //Grenades GivePlayerWeapon(playerid, 35, 2); //Grenades } else if(gClass[playerid] == JET) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 28, 500); //M4 GivePlayerWeapon(playerid, 8, 2); GivePlayerWeapon(playerid, 23, 100); //Deagle GivePlayerWeapon(playerid, 16, 2); //Grenades } else if(gClass[playerid] == SP) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 27, 100); GivePlayerWeapon(playerid, 16, 1); GivePlayerWeapon(playerid, 24, 100); GivePlayerWeapon(playerid, 34, 100); GivePlayerWeapon(playerid, 31, 100); } else if(gClass[playerid] == SCOUT) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 29, 100); GivePlayerWeapon(playerid, 26, 100); GivePlayerWeapon(playerid, 24, 200); } else if(gClass[playerid] == AG) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 29, 100); GivePlayerWeapon(playerid, 4, 2); GivePlayerWeapon(playerid, 23, 200); } else if(gClass[playerid] == DONOR) { ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 26, 200); GivePlayerWeapon(playerid, 24, 100); GivePlayerWeapon(playerid, 9, 2); GivePlayerWeapon(playerid, 34, 200); GivePlayerWeapon(playerid, 31, 200); GivePlayerWeapon(playerid, 35, 2); GivePlayerWeapon(playerid, 16, 5); GivePlayerWeapon(playerid, 1, 1); }
Код:
#define TEAM_GERMANY 0 #define TEAM_BRAZIL 1 #define TEAM_RUSSIA 2 #define TEAM_USA 3 #define TEAM_IRAN 4