Godmode only when admin
#1

Hi guys!

I'm trying to create a godmode script, the godmode may only activate if the player is RCON admin.

But I'm doing something wrong, can someone tell me whats wrong with my code?

Код:
CMD:god(playerid, params[]) //Line 88
		if(!IsPlayerAdmin(playerid))
	{
		SendClientMessage(playerid,0xFF0000AA,"Mag jij niet!.");
		return 1;
	}
    if(GodMode[playerid] == 0) //god mode not set, lets set it
    }
        SetPlayerHealth(playerid, INFINITY);    //set the health to infinity
        GodMode[playerid] = 1;    //set godmode to true
        SendClientMessage(playerid, 0xFF0000FF, "Godmode aan");
    else if(GodMode[playerid] == 1) //god mode set .. lets unset it
    }
        SetPlayerHealth(playerid, 100.0);    //set health to 100%
        GodMode[playerid] = 0;    //set godmode to false
        SendClientMessage(playerid, 0xFF0000FF, "Godmode uit");
    return 1; //Line 104
}
Error I'm getting:
Код:
god.pwn(88) : error 010: invalid function or declaration
god.pwn(88 -- 99) : error 010: invalid function or declaration
god.pwn(88 -- 104) : error 010: invalid function or declaration
god.pwn(88 -- 104) : fatal error 107: too many error messages on one line
Thanks!
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: 4 Guest(s)