16.09.2016, 16:35
I am using x337's gang system...
i get this error in console (using crashdetect)
This is what i got @ onplayerupdate
Any solutions?
i get this error in console (using crashdetect)
PHP код:
[18:30:17] [debug] AMX backtrace:
[18:30:17] [debug] #0 0001fa9c in ?? (16, 473, 2, -994299568, 1147541815, 1089041245, 263172, 263056, -1) from Gang_System.amx
[18:30:17] [debug] #1 0001f2bc in ?? (16) from Gang_System.amx
[18:30:17] [debug] #2 0000eec0 in public OnPlayerUpdate (16) from Gang_System.amx
This is what i got @ onplayerupdate
PHP код:
public OnPlayerUpdate(playerid) //RyDer
{
if(Player[playerid][CreatingZone])
{
new Keys, UpDown, LeftRight;
GetPlayerKeys(playerid, Keys, UpDown, LeftRight);
TogglePlayerControllable(playerid, false);
if(LeftRight == KEY_LEFT)
{
MinPos[playerid][0] -= 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(LeftRight & KEY_LEFT && Keys & KEY_FIRE)
{
MinPos[playerid][0] += 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(LeftRight == KEY_RIGHT)
{
MaxPos[playerid][0] += 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(LeftRight & KEY_RIGHT && Keys & KEY_FIRE)
{
MaxPos[playerid][0] -= 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(UpDown == KEY_UP)
{
MaxPos[playerid][1] += 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(UpDown & KEY_UP && Keys & KEY_FIRE)
{
MaxPos[playerid][1] -= 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(UpDown == KEY_DOWN)
{
MinPos[playerid][1] -= 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(UpDown & KEY_DOWN && Keys & KEY_FIRE)
{
MinPos[playerid][1] += 8.0;
GangZoneDestroy(PlayerZone[playerid]);
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
GangZoneShowForPlayer(playerid, PlayerZone[playerid], HexToInt("000000FF"));
}
else if(Keys & KEY_SECONDARY_ATTACK)
{
TogglePlayerControllable(playerid, true);
Player[playerid][CreatingZone] = false;
ShowPlayerDialog(playerid, DIALOG_SAVEZONE, DIALOG_STYLE_INPUT, "Gang System", "Input gang zone name below, press \"Delete\" to delete current zone", "Save", "Delete");
}
}
return 1;
}