[Help!!] with script - 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)
+--- Thread: [Help!!] with script (
/showthread.php?tid=318029)
[Help!!] with script -
antoniotono97 - 13.02.2012
I want to create little script with command "/mh" "/Myhelp"
So i cant enter my commands!
Please help..! Im new! and fasl learner!
I dont know how to start
Re: [Help!!] with script -
Konstantinos - 13.02.2012
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
if( !strcmp( cmdtext, "/myhelp", true ) || !strcmp( cmdtext, "/mh", true ) )
{
SendClientMessage( playerid, 0xFFFFFFFF, "Available Commands!" );
SendClientMessage( playerid, 0xFFFFFFFF, "/command1, /command2, /command3 .. and more of your command!s" );
return 1;
}
// Rest of commands
return 0;
}
Re: [Help!!] with script -
ProdrifterX - 13.02.2012
u want /myhelp
and shows in box? (example: commands blabla?) with Ok and Cancel buttons? or?
_________________
IP :
188.40.57.132:7777
Drift - Generation
Re: [Help!!] with script -
antoniotono97 - 13.02.2012
Quote:
Originally Posted by ProdrifterX
u want /myhelp
and shows in box? (example: commands blabla?) with Ok and Cancel buttons? or?
|
Anyhting
In Chat or Menu ..Just wen i write "/mh" or "/myhelp" to show mi that commands...
..Sory for my bad English
Re: [Help!!] with script -
doreto - 13.02.2012
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Available Commands!","/command1\n/command2\n/command3\n","OK","Cancel");// \n make new line
return 1;
}
return 0;
}
Re: [Help!!] with script -
Konstantinos - 13.02.2012
Quote:
Originally Posted by doreto
PHP код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Available Commands!","/command1\n/command2\n/command3\n","OK","Cancel");// \n make new line
return 1;
}
return 0;
}
|
/help isn't 10 characters
Re: [Help!!] with script -
doreto - 13.02.2012
Quote:
Originally Posted by Dwane
/help isn't 10 characters
|
i just fast make
& copy
Re: [Help!!] with script -
Twisted_Insane - 13.02.2012
Nope! That's the problem of anybody here who is makin' a strcmp-cmd! You just learned something by heart, written in wiki, now you think there has to be 10!! Btw, it's five, 'cause you count the slash also!
Dwane's command was the best, if it's this what you want! If not, create a dialog!