SA-MP Forums Archive
Zones Virtualworlds - 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: Zones Virtualworlds (/showthread.php?tid=415106)



Zones Virtualworlds - Maraudeur - 11.02.2013

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;
}