HP Command - 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: HP Command (
/showthread.php?tid=543583)
HP Command -
Dezzzy - 27.10.2014
Код HTML:
C:\Users\Gigi\Desktop\America Life\gamemodes\tutorial.pwn(99) : error 010: invalid function or declaration
C:\Users\Gigi\Desktop\America Life\gamemodes\tutorial.pwn(102) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
have this 2 error .. on this
Код HTML:
if(strcmp("kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
return 1;
}
99 Line Is --- if(strcmp("kill", cmdtext, true, 10) == 0)
102 Line Is --- return 1;
Re: HP Command -
Dezzzy - 27.10.2014
i know now sryy
Re: HP Command -
Glossy42O - 27.10.2014
nvm.
Re : HP Command -
Buthers - 27.10.2014
Good afternoon.
The wiki is present for you, replace your code per :
PHP код:
#include <a_samp> // We include <a_samp> for get the functions of samp.
public OnPlayerCommandText(playerid, cmdtext[]) // Your callback.
{
if(strcmp(cmdtext,"/kill",true,10)==0) // If you do the command /kill.
{
SetPlayerHealth(playerid, 0); // Set value 0 of health of player.
return 1;
}
return 0; // Good, return 0.
}
Kind regards.
Re: HP Command -
M0HAMMAD - 27.10.2014
pawn Код:
if(strcmp("kill", cmdtext, true, 10) == 0) // you must add / before kill : /kill
you can use dcmd or ...
it's better