God Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: God Help (
/showthread.php?tid=597258)
God Help -
Compiler - 28.12.2015
HI Guys,
Can Anybody help me, I am having problem with putting the tag "GodMode Enabled" on top of the player who have godmode enabled. Can anybody help me?
Regards,
Compiler
Re: God Help -
IceBilizard - 28.12.2015
PHP код:
#include <zcmd>
new Text3D:Label[MAX_PLAYERS + 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");
return 1;
}
Re: God Help -
Compiler - 29.12.2015
And I also want a message to show to the player who tries to shoot a Player which has god mode enabled.
Picture:
Re: God Help -
Ritzy2K - 29.12.2015
OnPlayerGiveDamage use this, show GameText to "issuerid" if playerid has god mode enabled.
Re: God Help -
Compiler - 29.12.2015
Can you give me the Script?
Re: God Help -
IceBilizard - 30.12.2015
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;
}