03.07.2011, 19:27
Hello!
There is some wrong with a texdraw/menubox for a script.
Uhm... when i use this code below, other players "steal" the menu from all others, if you are in a vehicle and have the menu on screen, you loose it when some one else enter a vehicle
And if i remove this part, the menu are not being "stealed" but it disappear after you been playing for a while. like 5-15 min, and if you get out the vehicle and enter it again, the menu appears 2 sec and disappear again. then i have to restart server to get it work proper again
There is some wrong with a texdraw/menubox for a script.
Uhm... when i use this code below, other players "steal" the menu from all others, if you are in a vehicle and have the menu on screen, you loose it when some one else enter a vehicle
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
vmid[playerid] = GetVehicleStatID(GetVehicleModel(vehicleid));
if(vmid[playerid] > -1) {
bptype[playerid] = 0;
#if(USE_TEXTDRAWS)
TextDrawHideForPlayer(playerid, bombtext[playerid]);
TextDrawDestroy(bombtext[playerid]);
KillTimer(removetimer[playerid]);
SetTimerEx("ShowTextDraw", 500, 0, "iii", playerid, vehicleid, 0);
#endif
}
return 1;
}
Mauzen
pawn Код:
TextDrawHideForPlayer(playerid, bombtext[playerid]);
TextDrawDestroy(bombtext[playerid]);
KillTimer(removetimer[playerid]);