Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // God-mode by EvanA //
- // Version 5 //
- // Feel like /god.
- #include <a_samp>
- #include <zcmd>
- #define COLOR_SLATEGRAY 0x708090FF
- #define COLOR_LIMEGREEN 0x32CD32FF
- new IsInGod[MAX_PLAYERS];
- COMMAND:god(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- if(IsInGod[playerid] == 0)
- {
- IsInGod[playerid] = 1;
- SetPlayerHealth(playerid, 99999999999999999999999999999999999999999999999999999999999999999999);
- SendClientMessage(playerid, 0xFFFFFFFF, "Godmode activated.");
- }
- else if(IsInGod[playerid] == 1)
- {
- IsInGod[playerid] = 0;
- SetPlayerHealth(playerid, 100);
- SendClientMessage(playerid, 0xFFFFFFFF, "Godmode de-activated.");
- }
- }
- else SendClientMessage(playerid, 0xFFFFFFFF, "You aren't authorized to use this command.");
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsInGod[playerid] == 1) SetPlayerHealth(playerid, 9999999999999999999999999999999999999999);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/jetpack", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- SendClientMessage(playerid, COLOR_LIMEGREEN, "You have given yourself a jetpack!");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- return 1;
- SendClientMessage(playerid, COLOR_SLATEGRAY, "You aren't authorized to use this command!");
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement