public OnPlayerText(playerid, text[])
{
if (!strcmp(text, "!hello", true)) {
SendClientMessage(playerid, -1, "Hello");
return 0;
}
return 1;
}
|
I didn't understand anything, but...
pawn Код:
|
public OnPlayerText(playerid, text[])
{
if (!strcmp(text, "!hello", true)) {
SendClientMessage(playerid, -1, "Hello");
return 0; //This one.
}
return 1;
}
|
Did you add the return 0 before the } in the strcmp condition?
|
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;
}
|
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;
}
you can fix this thankyou for that |