Godmode only when admin
#4

You have to include zcmd.inc which you can download from:
https://sampforum.blast.hk/showthread.php?tid=91354

And yea replace it with this:

You forgot some { and } very important to look at those things when you are scripting.


[QUOTE=gtakillerIV;2164430]Before:

PHP код:
CMD:god(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"Mag jij niet!.");
    if(
GodMode[playerid] == 0//god mode not set, lets set it
    
{
        
SetPlayerHealth(playeridINFINITY);    //set the health to infinity
        
GodMode[playerid] = 1;    //set godmode to true
        
SendClientMessage(playerid0xFF0000FF"Godmode aan");
    }
    else if(
GodMode[playerid] == 1//god mode set .. lets unset it
    
{
        
SetPlayerHealth(playerid100.0);    //set health to 100%
        
GodMode[playerid] = 0;    //set godmode to false
        
SendClientMessage(playerid0xFF0000FF"Godmode uit");
    }
    return 
1;

QUOTE]
Reply


Messages In This Thread
Godmode only when admin - by nickbouwhuis - 11.10.2012, 12:04
Re: Godmode only when admin - by gtakillerIV - 11.10.2012, 12:10
Re: Godmode only when admin - by M3mPHi$_S3 - 11.10.2012, 12:11
Re: Godmode only when admin - by Roel - 11.10.2012, 12:11
Re: Godmode only when admin - by gtakillerIV - 11.10.2012, 12:14
Re: Godmode only when admin - by M3mPHi$_S3 - 11.10.2012, 12:16
Re: Godmode only when admin - by xMCx - 11.10.2012, 12:16
Re: Godmode only when admin - by Roel - 11.10.2012, 12:16
Re: Godmode only when admin - by M3mPHi$_S3 - 11.10.2012, 12:24
Re: Godmode only when admin - by Roel - 11.10.2012, 12:34

Forum Jump:


Users browsing this thread: 1 Guest(s)