[Help!!] with script
#1

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

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

u want /myhelp
and shows in box? (example: commands blabla?) with Ok and Cancel buttons? or?
_________________
IP : 188.40.57.132:7777
Drift - Generation
Reply
#4

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

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/help"cmdtexttrue10) == 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;

Reply
#6

Quote:
Originally Posted by doreto
Посмотреть сообщение
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/help"cmdtexttrue10) == 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
Reply
#7

Quote:
Originally Posted by Dwane
Посмотреть сообщение
/help isn't 10 characters
i just fast make & copy
Reply
#8

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!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)