SA-MP Forums Archive
Simple question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Simple question (/showthread.php?tid=618074)



Simple question - kdaniel2410 - 30.09.2016

Can anyone see a problem with the following?

Quote:

stock SendLocalActionMessage(playerid, action[])
{
new str[128];
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
format(str, sizeof(str), "%s %s", GetPlayerCleanName(playerid), action);
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 8, x, y, z) SendClientMessage(i, COLOR_RPMESSAGE, str);
}
return 1;
}

EDIT: Pastebin because the above code looks shit!
I get this error but this function is practically identical to a one before hand which works flawlessly.




Re: Simple question - Vince - 30.09.2016

Код:
if(IsPlayerInRangeOfPoint(i, 8, x, y, z) SendClientMessage(i, COLOR_RPMESSAGE, str);
Now you figure out where the missing red closing bracket is supposed to go.


Re: Simple question - kdaniel2410 - 30.09.2016

Well... thats embarrassing,

Thanks.


Re: Simple question - AMouldyLemon - 30.09.2016

Nevermind