Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define white 0xFFFFFFFF // define-urile pt comanda
- new IsGod[MAX_PLAYERS]; // am adaugat-o in gm langa celelalte new-uri
- public OnPlayerUpdate(playerid) //Din nou,am adaugat unde trebuia
- {
- new Float:hp,Float:armour;
- new Float:health;
- new veh = GetPlayerVehicleID(playerid);
- GetPlayerHealth(playerid,hp);
- GetPlayerArmour(playerid,armour);
- GetVehicleHealth(veh, health);
- if(IsGod[playerid] == 1)
- {
- if(hp < 999.0) SetPlayerHealth(playerid, 1000.0);
- if(armour < 999.0) SetPlayerArmour(playerid, 1000.0);
- if(health < 999.0) SetVehicleHealth(veh, 1000.0);
- RepairVehicle(veh);
- }
- else if(IsGod[playerid] == 1) return 1;
- return 1;
- }
- CMD:god(playerid, params[]) // comanda
- {
- if(IsGod[playerid] == 0)
- {
- IsGod[playerid] = 1;
- SetPlayerHealth(playerid, 1000.0);
- SendClientMessage(playerid, white, "God Mode is Activated");
- SetVehicleHealth(playerid, 1000.0);
- }
- else if(IsGod[playerid] == 1)
- {
- IsGod[playerid] = 0;
- SetPlayerHealth(playerid, 100.0);
- SendClientMessage(playerid, white, "God Mode is DeActivated");
- SetVehicleHealth(playerid, 1000.0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement