Код:
#include "a_samp.inc"
#include "a_vehicles.inc"
#include "a_objects.inc"
stock IsVehicleInObjectRangePoint(vehicleid,objectid,Float:x,Float:y,Float:z)
{
GetVehiclePos(vehicleid,Float:x,Float:y,Float:z);
GetObjectPos(objectid,Float:x,Float:y,Float:z);
}
foward OnVehicleModel(vehicleid);
public OnVehicleModel(vehicleid){
new Float:x,Float:y,Float:z, Float:rx, Float:ry, Float:rz;
switch(vehicleid)
{
case 1:537;
case 2:538;
case 3:570;
case 4:590;
case 5:569;
}
if(IsVehicleInObjectRangePoint(vehicleid,1251,Float:x + 1 >= 0.1,Float:y + 1 >= 0.1,Float:z))
{
MoveObject(1251,Float:x,Float:y,Float:z, Float:rx, Float:ry, Float:rz + 11);
{
if(rx == rz)
{
SetObjectPos(1251,x + 5.5, y + 5.5, z + 5.5);
}
}
if(IsObjectMoving(1251) == false && IsVehicleInObjectRangePoint(vehicleid,1251,Float:x + 1 >= 0.1,Float:y + 1 >= 0.1,Float:z))
{
MoveObject(1251,Float:x,Float:y,Float:z, rx, ry, rz - 11);
if(rx == rz)
{
SetObjectPos(1251,x - 5.5, y - 5.5, z - 5.5);//other functions for not have time
}
}
}
return 0; //not certain
}
but have a errors
Код:
C:\samp server\pawno\smashbar.pwn(10) : error 010: invalid function or declaration
C:\samp server\pawno\smashbar.pwn(11) : warning 235: public function lacks forward declaration (symbol "OnVehicleModel")
C:\samp server\pawno\smashbar.pwn(15) : warning 215: expression has no effect
C:\samp server\pawno\smashbar.pwn(16) : warning 215: expression has no effect
C:\samp server\pawno\smashbar.pwn(17) : warning 215: expression has no effect
C:\samp server\pawno\smashbar.pwn(18) : warning 215: expression has no effect
C:\samp server\pawno\smashbar.pwn(19) : warning 215: expression has no effect
C:\samp server\pawno\smashbar.pwn(21) : warning 213: tag mismatch
C:\samp server\pawno\smashbar.pwn(21) : warning 213: tag mismatch
C:\samp server\pawno\smashbar.pwn(21) : warning 209: function "IsVehicleInObjectRangePoint" should return a value
C:\samp server\pawno\smashbar.pwn(30) : warning 213: tag mismatch
C:\samp server\pawno\smashbar.pwn(30) : warning 213: tag mismatch
C:\samp server\pawno\smashbar.pwn(30) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.