Police codes - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Police codes (
/showthread.php?tid=215960)
Police codes -
Beginnercoder - 24.01.2011
Hello I want to add some codes were anyone can use it in my server (civillians and cops).
When someone types 10-20 I want it to say there location in the server? (I want it to be just 10-20 NOT /10-20)
Once I know how to do one, I will be able to do the rest.
I got the police codes from here:
http://www.radiolabs.com/police-codes.html
Re: Police codes -
Sascha - 24.01.2011
pawn Код:
public OnPlayerText(playerid, text[])
{
if(!strcmp(text, "10-20", true))
{
new Float:x, Float:y, Float:z, string[100];
GetPlayerPos(playerid, x, y, z);
format(string, sizeof(string), "%f, %f, %f", x, y, z);
SendClientMessage(playerid, 0xFFFFFFAA, string);
}
return 1;
}
Re: Police codes -
Beginnercoder - 24.01.2011
When I input that to my script, I get loads of errors.