07.03.2019, 14:38
how can i seperate textdraws to another .pwn file and use them as an include ?
i read a tutorial about modular programming but I dont understand it.
this is how i made 'textdraws.pwn' file:
i used:
in my gamemode (textdraws.pwn is in gamemodes folder)
and i get this error when I compile my gamemode:
error 021: symbol already defined: "SSCANF_OnPlayerConnect"
thanks in advance
i read a tutorial about modular programming but I dont understand it.
this is how i made 'textdraws.pwn' file:
Код:
#include <a_samp> new PlayerText:TDEditor_PTD[MAX_PLAYERS][4]; public OnPlayerConnect(playerid) { TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 21.233411, 432.966857, "NAME"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.149332, 0.869924); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 2); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -1); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0); PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][0], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 2); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0); TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 4.666687, 431.837371, "box"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.000000, 1.200001); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][1], 130.000000, 0.000000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1); PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][1], 1); PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][1], 100); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0); PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][1], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 1); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0); TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 6.333343, 433.910980, "box"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][2], 0.000000, 0.766664); PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][2], 38.000000, 0.000000); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][2], 1); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][2], -1); PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][2], 1); PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][2], -1005750197); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0); PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][2], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][2], -1005750197); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][2], 1); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][2], 1); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0); TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 82.566764, 433.066955, "Player_Name"); PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.149332, 0.869924); PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][3], 2); PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][3], -1); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0); PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][3], 0); PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][3], 255); PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][3], 2); PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][3], 1); PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0); PlayerTextDrawShow(playerid, PlayerText:TDEditor_PTD[playerid][0]); PlayerTextDrawShow(playerid, PlayerText:TDEditor_PTD[playerid][1]); PlayerTextDrawShow(playerid, PlayerText:TDEditor_PTD[playerid][2]); PlayerTextDrawShow(playerid, PlayerText:TDEditor_PTD[playerid][3]); return 1; }
Код:
#include "textdraws.pwn"
and i get this error when I compile my gamemode:
error 021: symbol already defined: "SSCANF_OnPlayerConnect"
thanks in advance