SA-MP Forums Archive
OnPlayerCommandText ? help - 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: OnPlayerCommandText ? help (/showthread.php?tid=360858)



OnPlayerCommandText ? help - andrewgrob - 19.07.2012

i have 1 cmd . how do i get 2 cmds


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/profileinfo", cmdtext, true, 10) == 0)
 {
        SendClientMessage(playerid,0xFFFFFFAA,"/profile For Your ID");
        SendClientMessage(playerid,0xFFFFFFAA,"/profile full name /Part of name (for connected players");
        SendClientMessage(playerid,0xFFFFFFAA,"/profilec To Close An Open Profile");
        return 1;
    }
    return 0;
    }



Re: OnPlayerCommandText ? help - iggy1 - 19.07.2012

This info is so easy to come by i feel a bit like i'm breaking the rules helping you.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/profileinfo", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0xFFFFFFAA,"/profile For Your ID");
        SendClientMessage(playerid,0xFFFFFFAA,"/profile full name /Part of name (for connected players");
        SendClientMessage(playerid,0xFFFFFFAA,"/profilec To Close An Open Profile");
        return 1;
    }
    else if(strcmp("/otherinfo", cmdtext, true, 10) == 0)
    {
        //bler bler boo boo
       
        return 1;
    }
   
    return 0;
}
Have a look through some modes/filerscripts before asking something so simple please.


Re: OnPlayerCommandText ? help - andrewgrob - 19.07.2012

that dunt work

pawn Код:
{
    if (strcmp("/profileinfo", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0xFFFFFFAA,"/profile For Your ID");
        SendClientMessage(playerid,0xFFFFFFAA,"/profile full name /Part of name (for connected players");
        SendClientMessage(playerid,0xFFFFFFAA,"/profilec To Close An Open Profile");
        return 1;
    )
    else if(strcmp("/otherinfo", cmdtext, true, 10) == 0)
    {
        //bler bler boo boo
        return 1;
    )

    return 0;
}



Re: OnPlayerCommandText ? help - Rudy_ - 19.07.2012

what do you want in the other command?
This forum requires that you wait 120 seconds between posts. Please try again in 60 seconds.


Re: OnPlayerCommandText ? help - andrewgrob - 19.07.2012

for get it. im a newbie first time scriptor and just played with it and got it working

so haah . telling me its easy. when your code was code too . you noob

this is right code i need

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/profileinfo", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0xFFFFFFAA,"/profile For Your ID");
        SendClientMessage(playerid,0xFFFFFFAA,"/profile full name /Part of name (for connected players");
        SendClientMessage(playerid,0xFFFFFFAA,"/profilec To Close An Open Profile");
        return 1;
    }
    if (strcmp("/iwillusethis", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0xFFFFFFAA,"/noobs");
        SendClientMessage(playerid,0xFFFFFFAA,"/profile full name /Part of name (for connected players");
        SendClientMessage(playerid,0xFFFFFFAA,"/profilec To Close An Open Profile");
        return 1;
    }
    return 0;
}