06.05.2012, 11:56
(
Последний раз редактировалось vassilis; 06.07.2012 в 01:13.
)
SOLVED
stock WelcomeTo(color, msg[])
{
new formatted_msg[128];
format(formatted_msg, sizeof(formatted_msg), "Welcome to %s!", msg);
SendClientMessage(playerid, color, formatted_msg);
}
stock WelcomeTo(playerid,color,string[])
{
SendClientMessage(playerid,color,string);
}
#define WelcomeTo(%1,%2,%3) SendClientMessage(%1,%2,%3)
Simple exampple:
instead of writing: SendClientMessage(playerid,colorhere,"Welcome to Four Dragons Casino"); i would like to convert it to WelcomeTo(colorhere,"Four Dragons Casino"); |
I hadn't seen those replies - there was only one when I started writing my reply sorry (although my point that you didn't actually originally ask anything still stands). If you were just asking how to write basic functions, why didn't you check pawn-lang.pdf and the wiki first? Also, if you are writing functions for your mode you don't need "stock" or "public", you can just have normal functions.
|