OnPlayerCommandText ? help
#1

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

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.
Reply
#3

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

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

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


Forum Jump:


Users browsing this thread: 3 Guest(s)