Long time didn't have no prob.. Please help + rep
#1

Код:
error 035: argument type mismatch (argument 2)
Код:
stock ReturnPlayerZone(playerid)
{
	new playerzone[256] = "Unknown";
	for(new j; j < sizeof(zones); j++)
	{
		if(IsPlayerInZone(playerid,j))//this line
		{
			memcpy(playerzone, zones[j][zone_name], 0, 108);
			break;
		}
	}
    return playerzone;
}
Reply
#2

Please some one....
Reply
#3

You don't need the playerid there if you're already using the loop:

pawn Код:
if(IsPlayerInZone(j))
Reply
#4

InPlayerInZone requires the zone name to be inputted as string. But why bother writing your own function if there's already one available?
pawn Код:
stock GetPlayer2DZone(playerid, zone[], len=sizeof zone) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i = 0; i != sizeof(gSAZones); i++ )
    {
        if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
        {
            return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
        }
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)