09.07.2014, 13:36
(
Последний раз редактировалось AIped; 09.07.2014 в 14:56.
Причина: many typo's
)
Alright i have been playing around with dynamic areas...pickups ..checkpoints ..spheres..cubes.piramids or whatever there is more ARRHH ( sorry for that last part..to much emotion.. ).
After building up a nice piece of script like shown here i ALWAYS seem to be able to mix up the areas.
In this case here i made areas for Items and i wanted to add different areas (dynamic spheres) to vehicles (attached).
When i walk to a vehicle..the script thinks i am walking next to an Item instead.
(thats what i meant with mixing areas up)
I tried to both return 1 at the last bracket because that made sence to me...unfortunatly it didnt help.
Please teach me once and for all HOW to stop this ' mixing up ' for happening again in other scripts i tend to make.
After building up a nice piece of script like shown here i ALWAYS seem to be able to mix up the areas.
In this case here i made areas for Items and i wanted to add different areas (dynamic spheres) to vehicles (attached).
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])
{
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;
}
// 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;
}
(thats what i meant with mixing areas up)
I tried to both return 1 at the last bracket because that made sence to me...unfortunatly it didnt help.
Please teach me once and for all HOW to stop this ' mixing up ' for happening again in other scripts i tend to make.