09.07.2014, 15:37
You got the extra id (which shadows the array index), but then you did not check if it even matches your item area id, so if not walking into a item area, it will assume it's the item with the id of the extra id:
If it works, you can do the same thing for the vehicle areas
pawn Код:
public OnPlayerEnterDynamicArea(playerid, areaid)
{
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT || GetTickCount() - LastEnexStamp[playerid] < 1000) return 1;
new id = Streamer_GetIntData(STREAMER_TYPE_AREA, areaid, E_STREAMER_EXTRA_ID);
if(id >= 0 && id < MAX_ITEMS)
{
if(Item[id][picked] && Item[id][itemarea] == areaid) // <<<<<
{
LastEnter[playerid] = id;
LastEnexStamp[playerid] = GetTickCount();
PlayerTextDrawShow(playerid,TDpickup[playerid]);
PlayerTextDrawShow(playerid,TDdrop[playerid]);
PlayerTextDrawShow(playerid,TDaction[playerid]);
new ins[56];
format(ins,sizeof(ins),"~w~~k~~CONVERSATION_YES~ ~y~~y~%s",Item[id][ItemName]);
PlayerTextDrawSetString(playerid,TDpickup[playerid],ins);
return 1; // <<< the return must be here
}
}
// new varea = Streamer_GetIntData(STREAMER_TYPE_AREA, areaid, E_STREAMER_EXTRA_ID);
for(new c = 0; c < MAX_VEHICLES; c++)
if(areaid == vehaura[c])
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"should work..but i dont even see this message..just the textdraw from the items");
return 1;
}
return 1;
}
