11.02.2013, 20:06
I got it working already but now I wanted to make it shorter and i get "must be assigned to an array" on:
pawn Код:
case 1: zone[i] = "Los Santos Police Department";
case 2: zone[i] = "24-7 in Idlewood";
pawn Код:
public Zones_Update()
{
new zone[MAX_ZONE_NAME], string[30];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(GetPlayerVirtualWorld(i) == 0)
{
GetPlayer2DZone(i, zone, MAX_ZONE_NAME);
format(string,sizeof(string),"%s", zone);
TextDrawSetString(Zones[i], string);
TextDrawShowForPlayer(i, Zones[i]);
}
else
{
switch(GetPlayerVirtualWorld(i))
{
case 1: zone[i] = "Los Santos Police Department";
case 2: zone[i] = "24-7 in Idlewood";
}
}
}
return 1;
}