SA-MP Forums Archive
Somebody can give me the code to /kill 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Somebody can give me the code to /kill command? (/showthread.php?tid=111606)



Somebody can give me the code to /kill command? - marcos060595 - 02.12.2009

Please somebody post the /kill command code for me sorry for my bad english


Re: Somebody can give me the code to /kill command? - MPKaboose - 02.12.2009

just set the players health to 0.0
pawn Код:
if ( !strcmp( cmdtext, "/kill", true ) )
{
    SetPlayerHealth( playerid, 0.0 );
    return true;
}
put it under OnPlayerCommandText( ... )



Re: Somebody can give me the code to /kill command? - marcos060595 - 02.12.2009

C:\Users\Adriana\Documents\samp03asvr_R3_win32\paw no\include\kill.pwn(2) : error 010: invalid function or declaration
C:\Users\Adriana\Documents\samp03asvr_R3_win32\paw no\include\kill.pwn(5) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Please the complete script :/
I don't know scripting


Re: Somebody can give me the code to /kill command? - MPKaboose - 02.12.2009

can you tell me where you put the code?


Re: Somebody can give me the code to /kill command? - marcos060595 - 02.12.2009

filter scripts


Re: Somebody can give me the code to /kill command? - MPKaboose - 02.12.2009

No where you placed it in the script


Re: Somebody can give me the code to /kill command? - marcos060595 - 02.12.2009

in a new file


Re: Somebody can give me the code to /kill command? - MPKaboose - 02.12.2009

can you post the script?


Re: Somebody can give me the code to /kill command? - marcos060595 - 02.12.2009

if(strcmp(cmd, "/kill", true) == 0)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}

I just write this in the pawno
I really need a tutorial


Re: Somebody can give me the code to /kill command? - MPKaboose - 02.12.2009

that will never work open you're gamemode and copy that under
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if( !strcmp( cmdtext, "/kill", true ) == 0 ) //Like this
  {
    SetPlayerHealth( playerid, 0.0 );
    return true;
  }
  return false;
}