03.01.2014, 09:35
that's just wrong, the params of GetVehiclePos are: vehicleid, x, y, z
you're using the modelid instead od the vehicleid
do it like this, make a new var and assign the vehicleid of the car when the player types /starttrash to that var
example:
i'd also recommend making "HashTrash" a player specific variable. (as in HasTrash[playerid])
also, you should remove that filterscript stuff, like "OnFilterscriptInit"
you got stuff in OnGamemodeInit so im assuming that that's a GM not a FS.
you're also creating vehicles at the same spot, just sayin'
you're using the modelid instead od the vehicleid
do it like this, make a new var and assign the vehicleid of the car when the player types /starttrash to that var
example:
pawn Код:
new somevar[MAX_PLAYERS];
//in your starttrash cmd:
somevar[playerid] = GetVehicleID(playerid);
//in your /throw cmd, use somevar[playerid] instead of the model id:
GetVehiclePos(somevar[playerid],XXO, YXO, ZXO);
also, you should remove that filterscript stuff, like "OnFilterscriptInit"
you got stuff in OnGamemodeInit so im assuming that that's a GM not a FS.
you're also creating vehicles at the same spot, just sayin'