SA-MP Forums Archive
Traffic Signs doesnt work IG - 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: Traffic Signs doesnt work IG (/showthread.php?tid=497290)



Traffic Signs doesnt work IG - dimitri8 - 26.02.2014

Hey, I just wanna know how to use it IG that Traffic Signs Include and how to use it IG:
https://sampforum.blast.hk/showthread.php?tid=493325
I've got answerd already but a answer has bugs, so I'll ask again about that command somone gave me, It doesnt work IG and what is "NameFile"?
Код:
// ----<< Simple editor in-game >>----<
#include <a_samp>
#include <a_signs>
#include <zcmd>
#include <sscanf2>
new countsigns[MAX_PLAYERS];

COMMAND:createsigns(playerid, params[]){
    new File:signs, data[30];
    if(sscanf(params, "dss[20]", params[0], params[1], params[2])) return SendClientMessage(playerid, -1, "/createsigns (slotsigns(0-500)) (signsid(0-22)) (name file)");
    countsigns[playerid]=params[0];
    new Float:pos[4];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    SetPlayerFacingAngle(playerid, pos[3]);
    pos[1] = pos[1] + (5.0 * floatsin(-pos[3], degrees));
    pos[2] = pos[2] + (5.0 * floatcos(-pos[3], degrees));
    countsigns[playerid]=CreateTrafficSign(params[1], pos[0], pos[1], pos[2], pos[3]);

    format(data,sizeof(data),"%s.txt",params[2]);
    signs = fopen(data, io_append);
    format(data, sizeof data, "count signs: %d - CreateTrafficSign(%d, %0.4f, %0.4f, %0.4f, %0.4f);\r\n\r\n",params[0], params[1], pos[0], pos[1], pos[2], pos[3]);
    fwrite(signs,data);
    fclose(signs);
    return true;
}