need help for some cmds - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: need help for some cmds (
/showthread.php?tid=79899)
need help for some cmds -
darkhamza - 31.05.2009
iwant some commands and it's announce for showing player to type it so we start:
/god :give player infinitie health
/goto id teleport to player
/clear clear all cars, maps... for rcon admin
please help me for that and give me the amx file because im very bad in pawno
Re: need help for some cmds -
Klutty - 31.05.2009
Search.
Re: need help for some cmds -
darkhamza - 31.05.2009
Quote:
Originally Posted by darkhamza
iwant some commands and it's announce for showing player to type it so we start:
/god :give player infinitie health
/goto id teleport to player
/clear clear all cars, maps... for rcon admin
please help me for that and give me the amx file because im very bad in pawno
|
thats no funny
Re: need help for some cmds -
JoshTheBoss - 31.05.2009
the /god is easy
at the top:
Код:
forward godmode (playerid);
new godmode;
new GodActive[MAX_PLAYERS];
then at the bottom of your script:
Код:
public godmode (playerid)
{
SetPlayerHealth(playerid,500.0);
return 1;
}
then at onplayercommandtext:
Код:
if (strcmp("/GodMode", cmdtext, true, 10) == 0)
{
if (GodActive[playerid] == 0)
{
GodModeActive[playerid] = 1;
SendClientMessage(playerid,COLOR,"god on");
SetTimer("godmode", 200,1);
}
else
{
if (GodActive[playerid] == 1)
{
GodActive[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "god off");
KillTimer(godmode);
}
}
}
Re: need help for some cmds -
shitbird - 31.05.2009
Quote:
Originally Posted by JoshTheBoss
the /god is easy
at the top:
Код:
forward godmode (playerid);
new godmode;
new GodActive[MAX_PLAYERS];
then at the bottom of your script:
Код:
public godmode (playerid)
{
SetPlayerHealth(playerid,500.0);
return 1;
}
then at onplayercommandtext:
Код:
if (strcmp("/GodMode", cmdtext, true, 10) == 0)
{
if (GodActive[playerid] == 0)
{
GodModeActive[playerid] = 1;
SendClientMessage(playerid,COLOR,"god on");
SetTimer("godmode", 200,1);
}
else
{
if (GodActive[playerid] == 1)
{
GodActive[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "god off");
KillTimer(godmode);
}
}
}
|
Fail. This simply just gives you 500 hp. It doesnt keep spamming your hp up.
Re: need help for some cmds -
JoshTheBoss - 31.05.2009
crap on a stick, at least I tryed
try this link, it helps with the /god command
http://forum.sa-mp.com/index.php?topic=99846.0
Re: need help for some cmds -
shitbird - 31.05.2009
Quote:
Originally Posted by JoshTheBoss
crap on a stick, at least I tryed
|
Heh, no worries.
Re: need help for some cmds -
darkhamza - 31.05.2009
guys im very bad in pawno itryed now but idk how to save it ...
Re: need help for some cmds -
Jakku - 31.05.2009
Set the HP 100000, then it is infinite
Re: need help for some cmds -
darkhamza - 31.05.2009
how to set the HP im very bad in pawno if you know just do it for me give me an amx file then the problem will
finnish