Problem whit Zones - 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: Problem whit Zones (
/showthread.php?tid=501925)
Problem whit Zones -
Carxi - 21.03.2014
Hello, i've maked one script for the zones, in my localhost the script works good but in the hosting dosen't work good.
Can you help me?
Код:
public Zones_Update()
{
new zone[MAX_ZONE_NAME], string[30];
for(new i=0; i<MAX_PLAYERS; i++){
GetPlayer2DZone(i, zone, MAX_ZONE_NAME);
format(string,sizeof(string),"%s", zone);
TextDrawSetString(Zones[i], string);
TextDrawShowForPlayer(i, Zones[i]);}
return 1;
}
public CreatePlayerTextDraws(playerid)
{
SetTimer("Zones_Update", 500, 1);
for(new i=0; i<MAX_PLAYERS; i++){
Zones[i] = TextDrawCreate(86.000000, 325.000000, "_");
TextDrawBackgroundColor(Zones[i], 255);
TextDrawAlignment(Zones[i], 2);
TextDrawFont(Zones[i], 2);
TextDrawLetterSize(Zones[i], 0.200000, 1.100000);
TextDrawColor(Zones[i], -1);
TextDrawSetOutline(Zones[i], 1);
TextDrawSetProportional(Zones[i], 1);}
Re: Problem whit Zones -
Hanuman - 21.03.2014
Код:
public CreatePlayerTextDraws(playerid)
{
SetTimerEx("Zones_Update", 500, 1, "i", playerid);
Zones[playerid] = TextDrawCreate(86.000000, 325.000000, "_");
TextDrawBackgroundColor(Zones[playerid], 255);
TextDrawAlignment(Zones[playerid], 2);
TextDrawFont(Zones[playerid], 2);
TextDrawLetterSize(Zones[playerid], 0.200000, 1.100000);
TextDrawColor(Zones[playerid], -1);
TextDrawSetOutline(Zones[playerid], 1);
TextDrawSetProportional(Zones[playerid], 1);}
Re: Problem whit Zones -
Carxi - 21.03.2014
I've fix whit your code, but you've forgot this line:
PHP код:
for(new i=0; i<MAX_PLAYERS; i++){
Код:
public CreatePlayerTextDraws(playerid)
{
SetTimerEx("Zones_Update", 500, 1, "i", playerid);
for(new i=0; i<MAX_PLAYERS; i++){
Zones[playerid] = TextDrawCreate(86.000000, 325.000000, "_");
TextDrawBackgroundColor(Zones[playerid], 255);
TextDrawAlignment(Zones[playerid], 2);
TextDrawFont(Zones[playerid], 2);
TextDrawLetterSize(Zones[playerid], 0.200000, 1.100000);
TextDrawColor(Zones[playerid], -1);
TextDrawSetOutline(Zones[playerid], 1);
TextDrawSetProportional(Zones[playerid], 1);}