06.11.2014, 16:50
Hey, I am having a small problem, I made two functions, both of which would work perfectly, but I have a problem with it not working, and I suspect this to be due to the fact in one of the custom functions I was using a custom function.
Is there a way I could use a custom function inside a custom function?
Here is my functions:
And an example of usage (uses ZCMD):
Please help me with this issue so I can get it fixed ASAP.
Is there a way I could use a custom function inside a custom function?
Here is my functions:
pawn Code:
SendLocalClientMessage(playerid, Float:dist, color, str[])
{
new Float:ppos[3];
GetPlayerPos(playerid, ppos[0], ppos[1], ppos[2]);
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i, dist, ppos[0], ppos[1], ppos[2]))
SendClientMessage(i, color, str);
}
}
pawn Code:
SendClientMeMessage(playerid, astr[])
{
new name[MAX_PLAYER_NAME], string[144];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* %s %s", name, astr);
SendLocalClientMessage(playerid, 30.0, COLOR_RP, string);
}
pawn Code:
CMD:test(playerid, params[])
{
SendClientMeMessage(playerid, "is happy because is his /me command works.");
return 1;
}