InGame Traffic Sign Creator -
huhboy - 18.08.2015
Hi Guys!
It's work only with 0.3.7 servers, or better.
It's a simple Sign creator, which you can place traffic sign in the game, with the /sign command, and it was saved in the scriptfiles > saved signs.txt file.
Use:
-Download, or copy the code, and put it in your filterscripts folder, or paste it in ur gamemode script and compile it.
-Make a txt file in your scriptfiles folder, and rename it to saved signs.txt.
-Log in as Rcon Admin
-go the place, when you wanna create a sign.
-type /sign [sign id], and the sign is done.
-go to the saved signs.txt and copy the codes to your map script.
I tried to make the easiest way to create traffic signs.
the script use this includes:
-a_samp
-zcmd
-streamer (and the plugin, of course)
some pics:
Download:
http://www.solidfiles.com/d/4884074f43/
and the code:
Код:
#include <a_samp>
#include <streamer>
#include <zcmd>
#define red 0xff0000aa
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, -1, "InGame Traffic Sign Creator by JustaCube (aka.: huhboy) was loaded");
return 1;
}
CMD:sign(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, red, "Error: You must be an Administrator!");
if(!strlen(params)) return SendClientMessage(playerid, red, "Use: /sign [id]");
if(!IsNumeric(params)) return SendClientMessage(playerid, red, "Use only numbers!");
if(strval(params) < 19948 || strval(params)> 19992) return SendClientMessage(playerid, red, "The object id's must be between 19948 and 19992!");
new string2[512], Float:X, Float:Y, Float:Z, Float:Angle;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
CreateDynamicObject(strval(params), X, Y, Z-1.5, 0.0, 0.0, Angle);
format(string2, sizeof(string2), "CreateDynamicObject(%d, %.4f, %.4f, %.4f, %.4f, 100.0);",strval(params), X, Y, Z-1.5, Angle);
SendClientMessage(playerid, 0x00ff00AA, "The sign was placed, and saved: scriptfiles > saved signs.txt");
SetPlayerPos(playerid, X+2, Y, Z);
new File:Lfile;
new string[256];
Lfile = fopen("saved signs.txt",io_append);
format(string,sizeof(string),"%s\r\n",string2);
fwrite(Lfile,string);
fclose(Lfile);
return 1;
}
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
and...sorry for my bad english....
Re: InGame Traffic Sign Creator -
LazyB0y - 18.08.2015
Wrong place post it here
http://forum.sa-mp.com/forumdisplay.php?f=82
Re: InGame Traffic Sign Creator -
huhboy - 18.08.2015
I changed it to Filterscript.
Re: InGame Traffic Sign Creator -
benjaminjones - 19.08.2015
pawn Код:
Error: You have must be an Administrator.
This is wrong, please change it with this.
pawn Код:
Error: You must be an Administrator.
But I guess, good job.
Re: InGame Traffic Sign Creator -
X337 - 19.08.2015
Good Job
Respuesta: InGame Traffic Sign Creator -
INKISICION - 19.08.2015
Very good