Quote:
Originally Posted by Xtreme_playa
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/healme", cmdtext, true, 7) == 0) // string count for /healme is 7 not 10 { SetPlayerArmour(playerid, 50); SetPlayerHealth(playerid, 50); SendClientMessage(playerid, COLOR_PINK, "You've refilled your Armour, and health. Goodluck!"); return 1; } return 1; }
Don't put that 10 blindly, it stands for number of strings to be compared to process the command further, if the number the strings don't match the number in the your command, you'd get "Unknown Command". For /healme, it would be 7 including "/".
|
I just copied his command and get rid off warnings, didn't remove or add code cuz i don't want to screw something else in his script!