Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[FilterScript] God System With Health & Armour Restore

$
0
0
Credits:
Zeex: ZCMD
Usmanmemon: GetpVarFloat & SetpVarfloat [helper]
RoyalGamer: scripting the god command

PHP Code:

/*                                  CREDITS
 *
 *                        RoyalGamer & Usmanmemon
 *
 */
#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Simple God Command By RoyalGamer");
    print(
"--------------------------------------\n");
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

CMD:god(playeridparams[])
{

    if(
GetPVarInt(playerid"godmod") == 0)
    {
        new 
Float:healthsFloat:armours;
        
//Old Health
        
GetPlayerHealth(playerid,healths);
        
SetPVarFloat(playerid"health"healths);
        
//Old Armour
        
GetPlayerArmour(playerid,armours);
        
SetPVarFloat(playerid"armour"armours);
        
SetPVarInt(playerid"godmod"1);
        
SetPlayerHealth(playerid99999999);
        
SetPlayerArmour(playerid99999999);
    }
    else
    {
        
//Restore Health
        
SetPlayerHealth(playeridGetPVarFloat(playerid"health"));
        
//Restore Armour
        
SetPlayerArmour(playeridGetPVarFloat(playerid"armour"));
        
SetPVarInt(playerid"godmod"0);
    }
    return 
1;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>