[Tutorial] How make some easy ZCMD command's for newbie's +Explain
#1

Ok i'll Explain to you guys how make simple /akill
Ok first go to your's ZCMD and do it
Код:
CMD:akill(playerid, params[])
this is your section where's you will make your's Commands
add it on the Top of your server u will use it soon
Код:
new tragetID;
new reason[64];
new str[128];
new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];//you will use it later with your sscanf
GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
GetPlayerName(tragetID, Playername, sizeof(Playername));[/CODE]
ok here is the sscanf that mean you making command that will be like /akill (id)(reason)
on other player
Код:
if(sscanf(params, "us[64]", tragetID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /akill [playerid] [reason]");
ok now we need make that only admin can use this command
do it
Код:
if(!IsPlayerAdmin(playerid)) SendClientMessage, COLOR_RED, "you are not admin");
ok we done with it, if u not logged in Rcon so u cannot use this cmd
Код:
if(!IsPlayerConnected(tragetID))//if u did /akill 0 hha and the player not connected so you will get message->
return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
ok now we need add the reason like admin name: have been akilled tragetid: (reason)
ok ad this
Код:
format(str, sizeof(str), "'%s' has been akill by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
SendClientMessageToAll(COLOR_RED, str); //send that message to all
Ok we soon will done
this message will send to eveyone
ok now we need add it
to kill the player after u type /akill
add this
SetPlayerHealth(tragetID, 0);
Ok now we done
NOTE
this is my first TUT so please don't be made
if you not like it so please leave this Section
i'm newbie to
Reply
#2

God, another pity tutorial! Hell, I can't stand those sh*t no more! READ THIS:

https://sampforum.blast.hk/showthread.php?tid=65567

Also, practice your English and stop making some kind of "copies" from my tutorial in my signature! By the way, your command looks incomplete and....oh god, forget it!
Reply
#3

hmmm's? my english bad and i'm not see in your "signture" /akill tut
Reply
#4

Oh god, your title is "ZCMD commands", and you've just copy-pasted a pity, broken command into here! In my signature isn't a damn "akill"-command, but 2 big tutorials with 5 ZCMD commands in each included! Just look HOW I explained everything there, and compare it to your little, small and broken tutorial!
Reply
#5

You need to set the health to 0 also to kill him...
Reply
#6

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
You need to set the health to 0 also to kill him...
LMAO he actually forgot to kill the player in a /akill command... Nice one, everyone should learn how NOT to kill a player with an /akill command \o/
Reply
#7

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
Oh god, your title is "ZCMD commands", and you've just copy-pasted a pity, broken command into here! In my signature isn't a damn "akill"-command, but 2 big tutorials with 5 ZCMD commands in each included! Just look HOW I explained everything there, and compare it to your little, small and broken tutorial!
Stop trying to boost your posts. You don't need to come here and insult this guy who's trying to make something to help others when he has dificulties speaking english. You made better tutorials, yea. But who gave you the rights to insult others because they made tutorials that are not as good as yours. So please do yourself a favor, sit back in your chair and chill out. I pitty you.
Reply
#8

Quote:
Originally Posted by andrew2695
Посмотреть сообщение
Stop trying to boost your posts. You don't need to come here and insult this guy who's trying to make something to help others when he has dificulties speaking english. You made better tutorials, yea. But who gave you the rights to insult others because they made tutorials that are not as good as yours. So please do yourself a favor, sit back in your chair and chill out. I pitty you.
You do realise that you bumped a 4 months old thread with a useless comment, right?
Reply
#9

Quote:
Originally Posted by king_hual
Посмотреть сообщение
You do realise that you bumped a 4 months old thread with a useless comment, right?
And you just did the same.
Reply
#10

Quote:
Originally Posted by king_hual
Посмотреть сообщение
You do realise that you bumped a 4 months old thread with a useless comment, right?
Where is the problem? You think the old threads/tutorials are not useful anymore? Please, move off.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)