GodMode Script
#1

Hi Guys Im Need Your Help I Have A GodMode Script And I Want To Make The GodMode Player Can't Shoot Other Player Any Idea Guys Sorry For My Bad English
Reply
#2

https://www.******.gr/search?q=samp+...od+mode+script
Reply
#3

I'm Already Search For It Just Want A Function For The GodMode Player Can't Shoot Other Player
Reply
#4

not sure about this
PHP код:
#include a_samp
#include zcmd
new god1[MAX_PLAYERS];
CMD:god(playerid,params[])
{
if(
IsPlayerAdmin(playerid)) {
if(
god1[playerid] == 0) {
SetPlayerHealth(playerid99999);
SendClientMessage(playerid,-1,"God Mode Turned On.");
} else if(
god1[playerid] == 1) {
SetPlayerHealth(playerid100);
SendClientMessage(playerid,-1,"God Mode Turned off.");

} else 
SendClientMessage(playerid,-1,"You need to Be RCON to use this command.");
return 
1;
}
public 
OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
  if(
god1[playerid] == 1) {
    
SendClientMessage(playerid0xFFFFFFFF"You are not allowed to shot players when god mode on.");
    return 
0;
   }
  return 
1;
}
public 
OnPlayerSpawn(playerid)
{
if(
god1[playerid] == 1) {
SetPlayerHealth(playerid99999);
}
return 
1;
}
public 
OnPlayerConnect(playerid)
{
god1[playerid] = 0;
return 
1;

Reply
#5

PHP код:
public OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype == 1)
    {
        if(
GodMode[hitid] == 1)
        {
            return 
0;
        }
    }
    return 
1;

GodMode is the variable in which you set if the player has godmode.
Reply
#6

This may help you:

https://sampforum.blast.hk/showthread.php?tid=493710&page=2
Reply
#7

Thx Guys I Will Try It
Reply
#8

Код:
new Godmode[MAX_PLAYERS];

CMD:god(playerid)
{
     if(Godmode[playerid] == false)
     {
     SetPlayerHealth(playerid, cellmax);
     ResetPlayerWeapons(playerid);
     GameTextForPlayer(playerid, "~g~God mode enabled", 3000, 3);
     Godmode[playerid] = true;
     }
     else
     {
     SetPlayerHealth(playerid, 100);
     GameTextForPlayer(playerid, "~g~God mode disabled", 3000, 3);
     Godmode[playerid] = false;
     }
     return 1;
}

public OnPlayerSpawn(playerid)
{
     if(Godmode[playerid] == true)
     {
     SetPlayerHealth(playerid, cellmax);
     ResetPlayerWeapons(playerid);
     }
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)