Hey there! This is my small tutorial on how to call functions by text
Note: Using this players on your server will call functions by text, not using /c cmdtext
So
All you need is:
1st. Change
public OnPlayerText To this view: OnPlayerText(playerid, text[])
now, i will show you how does it work:
[pawn]public OnPlayerText(playerid, text[])
{
if(strcmp(text, "Gimme gren please", true)==0)
{
SetPlayerWeapon(playerid, 12, 3);
SendClientMessage(playerid, 0xFF0000AA, "Waiter: your welcome!");
return 1;
}
return 0;
}[/pawn]
with this example players can get 3 grenades saying, "Gimme gren please"