19.03.2011, 21:23
About the car:
I removed that } else at the beginning, that could be one of the problem(s).
Also, please answer the questions in this script:
I removed that } else at the beginning, that could be one of the problem(s).
Also, please answer the questions in this script:
pawn Код:
if(PRESSED(KEY_ANALOG_DOWN))
{
if(!IsPlayerAdmin(playerid)) return 0; // This 'function' will not work if a player is not a RCON admin
if(ATTACK == 1) // Are you sure the variable is 1 for the server?
{
GetVehiclePos(OMGCAR[0], CX, CY, CZ); // Where did you define XC, CY, CZ?
GetVehicleZAngle(OMGCAR[0], CA); // Where did you define CA?
GetVehicleVelocity(OMGCAR[0], VX, VY, VZ); // Where did you define VX,VY,VZ
foreach(Player, i) // Where are you using this whole function? Why not at OnPlayerUpdate, so you don't have to use loops.
{
if(IsPlayerInVehicle(i, OMGCAR[0])) // Isn't it a bit too late to check if the player is in a vehicle if the information of this vehicle is stored above?
{
new seat = GetPlayerVehicleSeat(i);
DestroyVehicle(OMGCAR[0]);
OMGCAR[0] = CreateVehicle(522, CX, CY, CZ, CA, 0, 1, 0);
PutPlayerInVehicle(i, OMGCAR[0], seat);
SetVehicleVelocity(OMGCAR[0], VX, VY, VZ);
}
}
}
}