30.12.2015, 13:02
PHP код:
#include <zcmd>
new Text3D:Label[MAX_PLAYERS + 1];
new GodMod[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
GodMod[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
GodMod[playerid] = 0;
return 1;
}
CMD:godmode(playerid, params[])
{
Label[playerid] = Create3DTextLabel("GodMod Enabled", 0xFFFFFFFF, 0, 0, -35, 100, 0, 1);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.4);
SendClientMessage(playerid, -1, "GodMod Enabled");
GodMod[playerid] = 1;
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(GodMod[damagedid] == 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "That player have enabled his GodMode"); //You can change your message.
}
return 1;
}