Posts: 37
Threads: 8
Joined: Feb 2015
Reputation:
0
I'm Already Search For It Just Want A Function For The GodMode Player Can't Shoot Other Player
Posts: 1,266
Threads: 6
Joined: Oct 2014
31.08.2015, 10:56
(
Последний раз редактировалось jlalt; 31.08.2015 в 11:38.
)
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(playerid, 99999);
SendClientMessage(playerid,-1,"God Mode Turned On.");
} else if(god1[playerid] == 1) {
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,-1,"God Mode Turned off.");
}
} else SendClientMessage(playerid,-1,"You need to Be RCON to use this command.");
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(god1[playerid] == 1) {
SendClientMessage(playerid, 0xFFFFFFFF, "You are not allowed to shot players when god mode on.");
return 0;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(god1[playerid] == 1) {
SetPlayerHealth(playerid, 99999);
}
return 1;
}
public OnPlayerConnect(playerid)
{
god1[playerid] = 0;
return 1;
}