Make /kill Command [Rep +1] - 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: Make /kill Command [Rep +1] (
/showthread.php?tid=339644)
Make /kill Command [Rep +1] -
MichaelProPlayer - 04.05.2012
Can someone make this script for me?
Script : example My name is Michael and I used /kill then he's health will set to 0 and a clientmessage will send to all players that : Michael has Commited a Sucide .
can someone plz ? plz plz
Re: Make /kill Command [Rep +1] -
doreto - 04.05.2012
pawn Код:
stock PlayerName(i)// PlayerName(playerid) that you will use it if you wonna
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(i,pname,MAX_PLAYER_NAME);
return pname;
}
CMD:kill(playerid,params[])
{
SetPlayerHealth(playerid,-1);
new string[50];
format(string,sizeof(string),"%s has Commited a Sucide.",PlayerName(playerid)); // if you have your own getplayername stock change PlayerName(playerid) wich your!!
SendClientMessageToAll(-1,string);
return true;
}
If I have helped you click on 
Re: Make /kill Command [Rep +1] -
MichaelProPlayer - 04.05.2012
Quote:
Originally Posted by doreto
pawn Код:
stock PlayerName(i)// PlayerName(playerid) that you will use it if you wonna { new pname[MAX_PLAYER_NAME]; GetPlayerName(i,pname,MAX_PLAYER_NAME); return pname; }
CMD:kill(playerid,params[]) { SetPlayerHealth(playerid,-1); new string[50]; format(string,sizeof(string),"%s has Commited a Sucide.",PlayerName(playerid)); // if you have your own getplayername stock change PlayerName(playerid) wich your!! SendClientMessageToAll(-1,string); return true; }
If I have helped you click on 
|
Tried but many error messages..
Re: Make /kill Command [Rep +1] -
doreto - 04.05.2012
erros were are you sure its not from you when i compile it dint give me did you add the stock or did you have another cmd colled kill + this is done wich ZCMD include if you dont #include <ZCMD> it wont work
EDIT:if you are wich defoult processor use this but ZCMD if much faster + its 100% working next time dont say its give you errror
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
}
#endif
stock PlayerName(i)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(i,pname,MAX_PLAYER_NAME);
return pname;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 4) == 0)
{
SetPlayerHealth(playerid,-1);
new string[50];
format(string,sizeof(string),"%s has Commited a Sucide.",PlayerName(playerid));
SendClientMessageToAll(-1,string);
return 1;
}
return 0;
}
If I have helped you click on 
Re: Make /kill Command [Rep +1] -
MichaelProPlayer - 04.05.2012
Well Nevermind It was my mistake ... sry
Anyway Thanks for helping YOUR CODE ROX :P
Rep +1 for you