19.04.2011, 07:57
(
Последний раз редактировалось Cjgogo; 19.04.2011 в 09:14.
)
I'm trying to make in my gamemode a script that does so that if you enter a bus(Canny) and speed over 60mph,it shows you a dialog that on your car has been planted a bomb,and if you slow down below 50mph it blows up.I have the PAWn script with no errors,but in-game it's not working,please HELP me fast(as you didn't asnwers the other topics at least answer this one :P):
(other dialogs following that's why no return)
So no errors when compiling,but it's not working,what' s wrong?
HELP!!!
pawn Код:
#define DIALOG_INFERNALRACE 5
#include <a_samp>
public OnPlayerEnterVehicle(playerid,vehicleid, ispassenger)
{
new Float:x, Float:y, Float:z;
GetVehicleModel(vehicleid);
if(vehicleid == 431)
{
GetVehicleVelocity(vehicleid,x,y,z);
if(GetVehicleVelocity(vehicleid,x,y,z) == x*1.5,y*1.5,z*1.5)
{
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,"Infernal Race","A bomb has been planted on your bus,\nand if you slow down below 50mph,\nyou will be blowed up","Accept","Accept");
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==5)
{
if(response==1)
{
new vehicleid=GetPlayerVehicleID(playerid);
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
if(GetVehicleVelocity(vehicleid,x,y,z) == x*1.5,y*1.5,z*1.5)
{
SendClientMessage(playerid,RED,"A bomb has been planted on your bus,DON'T SLOW DOWN BELOW 50mph OR YOU'LL be blwoed up");
}
if(GetVehicleVelocity(vehicleid,x,y,z) < x*0.5,y*0.5,z*0.5)
{
SetVehicleHealth(vehicleid,0);
SendClientMessage(playerid,RED,"BYE BYE,mission acomplished,bus blowed up");
}
}
if(response==1)
{
new vehicleid=GetPlayerVehicleID(playerid);
new Float:x, Float:y, Float:z;
GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
if(GetVehicleVelocity(vehicleid,x,y,z) == x*1.5,y*1.5,z*1.5)
{
SendClientMessage(playerid,RED,"A bomb has been planted on your bus,DON'T SLOW DOWN BELOW 50mph OR YOU'LL be blwoed up");
}
if(GetVehicleVelocity(vehicleid,x,y,z) < x*0.5,y*0.5,z*0.5)
{
SetVehicleHealth(vehicleid,0);
SendClientMessage(playerid,RED,"BYE BYE,mission acomplished,bus blowed up");
}
}
}
So no errors when compiling,but it's not working,what' s wrong?
HELP!!!