Vice City Multiplayer
General Discussion => Support => Tutorials => Topic started by: NeskWriter on November 13, 2012, 10:11:23 am
-
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" :P
(http://image.ph/images/2012/11/13/Ynz4.jpg)
-
I wouldn't really call this a tutorial. I think this should be in the Snippet's Section.
-
I think you're right. :-\
-
:O nice one
-
This would be considered a tutorial, though very short, so it will stay here.