17.10.2012, 22:18
el problema no estaba en el retum..
aca los errores:
----> https://sampwiki.blast.hk/wiki/Control_Structures#return
aca los errores:
pawn Код:
#include <a_samp>
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new countpos[MAX_PLAYERS];
new Flame[MAX_PLAYERS][2];
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
new vehid = GetPlayerVehicleID(playerid);
new model0 = GetVehicleModel(vehid);
if(model0 == 522 || model0 == 461 || model0 == 463 || model0 == 468 || model0 == 523)
{
new Float:Velocity[3];
GetVehicleVelocity(vehid, Velocity[0], Velocity[1], Velocity[2]);
if(Velocity[0] <1.3 && Velocity[1] < 1.3 && Velocity[0] > -1.3 && Velocity[1] > -1.3)
{
SetVehicleVelocity(vehid, Velocity[0]*2, Velocity[1]*2, 0.0);
if(countpos[playerid] == 0)
{
countpos[playerid] = 1;
if(model0 != 46) //aca te falto el ) y tienes definido model0 el GetVehicleModel y aca colocaste model
{
Flame[playerid][0] = CreateObject(18693, 0.0, 0.0, 0.0, 0.0, 0, 0, 0);
Flame[playerid][1] = CreateObject(18693, 0.0, 0.0, 0.0, 0.0, 0, 0, 0);
if(model0 == 522)
{
AttachObjectToVehicle(Flame[playerid][0], vehid, 0.194999, 0.439999, 0.044999, 86.429962, 0.000000, 0.000000);
AttachObjectToVehicle(Flame[playerid][1], vehid, -0.204999, 0.439999, 0.044999, 86.429962, 0.000000, 0.000000);
}
else if(model0 == 461)
{
AttachObjectToVehicle(Flame[playerid][0], vehid, -0.354999, 0.374999, -0.164999, 84.419967, 3.645001, 0.000000);
AttachObjectToVehicle(Flame[playerid][1], vehid, 0.135000, 0.374999, -0.164999, 84.419967, 3.645001, 0.000000);
}
else if(model0 == 463)
{
AttachObjectToVehicle(Flame[playerid][0], vehid, 0.164999, 0.909999, -0.379999, 86.429962, 3.645001, 0.000000);
AttachObjectToVehicle(Flame[playerid][1], vehid, -0.419999, 0.909999, -0.379999, 86.429962, 3.645001, 0.000000);
}
else if(model0 == 523)
{
AttachObjectToVehicle(Flame[playerid][0], vehid, -0.345999, 0.459999, -0.141999, 89.444953, 3.645001, 0.000000);
AttachObjectToVehicle(Flame[playerid][1], vehid, 0.119000, 0.459999, -0.141999, 89.444953, 3.645001, 0.000000);
}
//} //esta llave de mas.
else
{
Flame[playerid][0] = CreateObject(18693, 0.0, 0.0, 0.0, 0.0, 0, 0, 0);
AttachObjectToVehicle(Flame[playerid][0], vehid, -0.095999, 0.734999, 0.159999, 90.449951, 3.645001, 0.000000);
}
}
}
}
}
}
return 1;
} //Aca mal Acomolado y no coninsidia con el ke abria el public