[Tutorial] How to make a simple /help and /kill command - NEWBIE FRIENDLY! - 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: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to make a simple /help and /kill command - NEWBIE FRIENDLY! (
/showthread.php?tid=338454)
[TUT] Deleted. -
JustinAn - 29.04.2012
Deleted.
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
TheDominator - 29.04.2012
Should also make it a little more advanced by including a dialog box for the command /help but still it's a pretty good tutorial. Also try to explain what is going on, like why you need to define the colours in the first place etc.
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
JustinAn - 29.04.2012
Thanks, will do it in the future.
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
sniperwars - 29.04.2012
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/help", true, 10) == 0)
{
new sz_msg [ 900 ];
strcat( sz_msg, "Welcome to\r\n");
strcat( sz_msg, "The /help\r\n");
strcat( sz_msg, "Command\r\n");
ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "Help", sz_msg, "OK", "Close");
return 1;
}
if(strcmp(cmdtext, "/kill", true, 10) == 0)
{
SetPlayerHealth(playerid, 0.0);
GameTextForPlayer(playerid, "~w~ Wasted!", 4500, 2);
return 1;
}
return 0;
}
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
JustinAn - 29.04.2012
Quote:
Originally Posted by sniperwars
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/help", true, 10) == 0) { new sz_msg [ 900 ]; strcat( sz_msg, "Welcome to\r\n"); strcat( sz_msg, "The /help\r\n"); strcat( sz_msg, "Command\r\n"); ShowPlayerDialog(playerid, 1337, DIALOG_STYLE_MSGBOX, "Help", sz_msg, "OK", "Close"); return 1; } if(strcmp(cmdtext, "/kill", true, 10) == 0) { SetPlayerHealth(playerid, 0.0); GameTextForPlayer(playerid, "~w~ Wasted!", 4500, 2); return 1; } return 0; }
|
What is your question?
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
TheDominator - 29.04.2012
No problems man
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
sniperwars - 29.04.2012
I have no question, I was showing a way of making the /help command into a dialog.
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
TheDominator - 29.04.2012
Quote:
Originally Posted by JustinAn
What is your question?
|
It's not a question, it's a code of what I said to do. He's created you a dialog box for /help
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
JustinAn - 29.04.2012
Oh alright.
Re: How to make a simple /help and /kill command - NEWBIE FRIENDLY! -
ReneG - 30.04.2012
There are already tons of these tutorials on the forums, and are quite frankly unnecessary.
Tutorials now a days should be made on something other than commands.