#1

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;
}
Reply
#2

Im surprised you got no errors when compiling,

https://sampwiki.blast.hk/wiki/SetPlayerHealth

if(!strcmp(cmdtext, "/kill", true))
{
SetPlayerHealth(playerid, 0);
return 1;
}
Reply
#3

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
Reply
#4

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
Reply
#5

This works for me.
pawn Код:
if(strcmp(cmdtext,"/kill",true)==0)
  {
  SetPlayerHealth(playerid, 0.0);
  return 1;
  }
Try it
Reply
#6

Код:
if(!strcmp(cmdtext, "/kill", true))
  {
  SetPlayerHealth(playerid, 0.0);
  return 1;
}
Now it should work.


EDIT: lol Bomba' Xtreme'Stuntage was faster ^^
Reply
#7

Hehe
Reply
#8

still not dieing
Reply
#9

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..
Reply
#10

ill use that if no one else comes up with anything thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)