19.02.2016, 23:56
Minha funзгo apenas funciona para o ID 0 ja tentei mudar o timer etc.. mais n adianta
PHP код:
#define FILTERSCRIPT
#include <a_samp>
#include <ZCMD>
#if defined FILTERSCRIPT
new BARCO[3];
new Float:oX, Float:oY, Float:oZ;
new Float:pX, Float:pY, Float:pZ;
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
CMD:moverbarco(playerid)
{
BARCO[0] = CreateObject(10794, 3123.86279, 2859.03394, 10.78237, 0.00000, 0.00000, 273.96307);
BARCO[1] = CreateObject(10795, 3123.29614, 2860.67505, 20.65570, 0.00000, 0.00000, 273.53851);
BARCO[2] = CreateObject(10793, 3118.73364, 2933.16211, 39.58103, 0.00000, 0.00000, 273.04440);
MoveObject(BARCO[0], 3123.86279, 2859.03394-10000, 10.78237, 10);
MoveObject(BARCO[1], 3123.29614, 2860.67505-10000, 20.65570, 10);
MoveObject(BARCO[2], 3118.73364, 2933.16211-10000, 39.58103, 10);
SetTimer("UPDATE_SHIP_PPOS", 1000, true);
return 1;
}
forward UPDATE_SHIP_PPOS(playerid);
public UPDATE_SHIP_PPOS(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetObjectPos(BARCO[0], oX, oY, oZ);
GetPlayerPos(playerid, pX, pY, pZ);
if(IsPlayerInRangeOfPoint(playerid, 350 , oX, oY, oZ) && pZ >= 35.0000)
if(IsPlayerInAnyVehicle(playerid))
{
CreateExplosion(pX, pY, pZ+8, 7, 50.0);
SendClientMessage(playerid, -1, "Acertou !");
return 1;
}
}
return 1;
}
#endif