/kill - 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: /kill (
/showthread.php?tid=130931)
/kill -
02manchestera - 28.02.2010
Why does this not work when i try it ingame (sorry im a mapper so am new to scripting)
Код:
if(!strcmp(cmdtext, "/kill", true))
{
SetPlayerHealth(0);
return 1;
}
Re: /kill -
Torran - 28.02.2010
Im surprised you got no errors when compiling,
https://sampwiki.blast.hk/wiki/SetPlayerHealth
if(!strcmp(cmdtext, "/kill", true))
{
SetPlayerHealth(playerid, 0);
return 1;
}
Re: /kill -
02manchestera - 28.02.2010
it sort of works but i dont die the health bar goes to 0 but il still working about do i need to add spawn or something
Re: /kill -
NitroSWA - 28.02.2010
Quote:
Originally Posted by 02manchestera
it sort of works but i dont die the health bar goes to 0 but il still working about do i need to add spawn or something
|
try 0.0
or -1.0
or is that useless? i use 0.0 no 0
Re: /kill -
Bomber - 28.02.2010
This works for me.
pawn Код:
if(strcmp(cmdtext,"/kill",true)==0)
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
Try it
Re: /kill -
geerdinho8 - 28.02.2010
Код:
if(!strcmp(cmdtext, "/kill", true))
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
Now it should work.
EDIT: lol Bomba' Xtreme'Stuntage was faster ^^
Re: /kill -
Bomber - 28.02.2010
Hehe
Re: /kill -
02manchestera - 28.02.2010
still not dieing
Re: /kill -
Torran - 28.02.2010
You could erm,
pawn Код:
if(!strcmp(cmdtext, "/kill", true))
{
SpawnPlayer(playerid);
return 1;
}
Or
pawn Код:
if(!strcmp(cmdtext, "/kill", true))
{
ForcePlayerClassSelection(playerid);
return 1;
}
You dont exactly die but..
Re: /kill -
02manchestera - 28.02.2010
ill use that if no one else comes up with anything thanks