30.03.2014, 09:59
Hello everybody I want to create simple granade launcher..But object does not appears I don`t know why here is code
Can you check?
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(GranadeLaucher[playerid] == 1)
{
new Float:X,Float:Y,Float:Z;
Object1 = CreateObject(342, X,Y,Z, 0, 0, 180);//toto nacim on player shoot
CreateExplosion(fX, fY, fZ, 3, 15.0);
GetPlayerLastShotVectors(playerid, X, Y, Z, fX, fY, fZ);
MoveObject(Object1,fX,fY,fZ,1.0,0,0,0);
}
return 1;
}