can i make different cmd ? (again)
#1

can i make different cmd Ex: /sethp is !sethp

old post is wrong section delete by MOD

i not answer thank you last post and do follow him yet

plz answer me again if you online now


sorry my English skill not good
Reply
#2

Use the search feature correctly. AGAIN.
Reply
#3

and one post him can input Onplayertext i need to try it i for got it
Reply
#4

I didn't understand anything, but...
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (!strcmp(text, "!hello", true)) {
        SendClientMessage(playerid, -1, "Hello");
        return 0;
     }
    return 1;
}
Are you talking about that?
Reply
#5

Quote:
Originally Posted by [DOG]irinel1996
Посмотреть сообщение
I didn't understand anything, but...
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (!strcmp(text, "!hello", true)) {
        SendClientMessage(playerid, -1, "Hello");
        return 0;
     }
    return 1;
}
Are you talking about that?
yes same this i will try it thankyou
Reply
#6

i try , it show message and script , can hide (!hello)

Hello
!hello
Reply
#7

Did you add the return 0 before the } in the strcmp condition?
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (!strcmp(text, "!hello", true)) {
        SendClientMessage(playerid, -1, "Hello");
        return 0; //This one.
     }
    return 1;
}
Reply
#8

Quote:
Originally Posted by [DOG]irinel1996
Посмотреть сообщение
Did you add the return 0 before the } in the strcmp condition?
oh my script is 1 for got change it ok thankyou very much
Reply
#9

you can tell me something ?


Код:
if (!strcmp(text, "!level", true))
		{
	        if (PlayerInfo[playerid][pAdmin] >= 21 && PlayerInfo[playerid][pAdmin] <= 45)
			{
			    tmp = strtok(text, idx);
				if(!strlen(tmp))
				{
	    			SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Usage: /level 1(Mode)/2(Admins)");
					SendClientMessage(playerid, COLOR_YELLOW2, "Function: Will see commands of specified level");
					return 0;
	 			}
	 			new selected = strval(tmp);
				if (selected == 1)
				{
					if (PlayerInfo[playerid][pAdmin] >= 21)
					{
		    			SendClientMessage(playerid, COLOR_LIGHT_BLUE, "___________ |- Moderator -| ___________");
						SendClientMessage(playerid, COLOR_YELLOW2, "kick warn unwarn ban");
					}
					else
					{
		    			return 0;
					}

				}
				if (selected == 2)
				{
				    if (PlayerInfo[playerid][pAdmin] == 45)
					{
		    			SendClientMessage(playerid, COLOR_LIGHT_BLUE, "___________ |- Administrator -| ___________");
		    			SendClientMessage(playerid, COLOR_YELLOW2,"All Mode Commands");
		    			SendClientMessage(playerid, COLOR_YELLOW2,"(veh)icle paycheck makeleader");
						
					}
					else
					{
	    				return 0;
					}
				}
			}
			else
			{
			    return 1;
			}
	        return 0;
     	}
when type !level 1 it not show command list it chat !level 1 normally

you can fix this thankyou for that
Reply
#10

Quote:
Originally Posted by edwardluciano
Посмотреть сообщение
you can tell me something ?


Код:
if (!strcmp(text, "!level", true))
		{
	        if (PlayerInfo[playerid][pAdmin] >= 21 && PlayerInfo[playerid][pAdmin] <= 45)
			{
			    tmp = strtok(text, idx);
				if(!strlen(tmp))
				{
	    			SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Usage: /level 1(Mode)/2(Admins)");
					SendClientMessage(playerid, COLOR_YELLOW2, "Function: Will see commands of specified level");
					return 0;
	 			}
	 			new selected = strval(tmp);
				if (selected == 1)
				{
					if (PlayerInfo[playerid][pAdmin] >= 21)
					{
		    			SendClientMessage(playerid, COLOR_LIGHT_BLUE, "___________ |- Moderator -| ___________");
						SendClientMessage(playerid, COLOR_YELLOW2, "kick warn unwarn ban");
					}
					else
					{
		    			return 0;
					}

				}
				if (selected == 2)
				{
				    if (PlayerInfo[playerid][pAdmin] == 45)
					{
		    			SendClientMessage(playerid, COLOR_LIGHT_BLUE, "___________ |- Administrator -| ___________");
		    			SendClientMessage(playerid, COLOR_YELLOW2,"All Mode Commands");
		    			SendClientMessage(playerid, COLOR_YELLOW2,"(veh)icle paycheck makeleader");
						
					}
					else
					{
	    				return 0;
					}
				}
			}
			else
			{
			    return 1;
			}
	        return 0;
     	}
when type !level 1 it not show command list it chat !level 1 normally

you can fix this thankyou for that
Did you put this under OnPlayerText or under OnPlayerCommandText? It should go under OnPlayerText.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)