[Tutorial] How to make kill command [ZCMD]
#1

Introduction

Hello this is my second tutorial it's about how to make kill command (Simple and easy to remember)

What do we need?

We need ZCMD

Where do i get it? Right here https://sampforum.blast.hk/showthread.php?tid=91354

Okay let's start

Before you do the command do this at the top #include <zcmd>

PHP Code:
CMD:kill(playeridparams[])
{
  
SetPlayerHealth(playerid0);
  return 
1;

-----------------------------------------------------------------------------------
CMD:kill(playerid, params[]) "This is our command (CMD can be COMMAND too !)"

SetPlayerHealth "Well i think i don't need to explain this but i still will this sets the player health so newbies if you ever make some random as* command and you wanna set his health use SetPlayerHealth and the "0" is the health we set too you also can do it 99 but it will set his health to 99 lol"

playerid, "Playerid it's the guy that sends the command so i guess i dunt really need to explain that"

return 1; "Dunno really how to explain that"

And close bracket at the end "}"
_--------------------------------------------------------------------------------------------------

Hope i explained very well

If i did not explain good please comment and i will explain better and please bad comments save it and don't comment it here.
Reply
#2

Nice could use some work but nice
Reply
#3

Quote:
Originally Posted by Sparke
View Post
Nice could use some work but nice
Thanks but there isn't much to explain
Reply
#4

You've done this for +rep lol, there's like 23058434057 of these in this section
Reply
#5

Quote:
Originally Posted by sammp
View Post
You've done this for +rep lol, there's like 23058434057 of these in this section
No i haven't i do this for newbies.

EDIT: Why should i do this for rep? it doesn't get you anywhere..
Reply
#6

if you return 1 (which is true (1==true)) in the zcmd it means that the command will be executed successfully and if you return 0 (which is false (0==false)) it will print a message in the players client "Error: Unknown Command" which means the command will not be executed
Reply
#7

Quote:
Originally Posted by Quickie
View Post
if you return 1 (which is true (1==true)) in the zcmd it means that the command will be executed successfully and if you return 0 (which is false (0==false)) it will print a message in the players client "Error: Unknown Command" which means the command will not be executed
Ah okay thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)