Breakveh CMD dosen't work...
#1

You told me to start learning properly, so I started to build commands. It's hard for me to start with then please help.

PHP код:
//BREAK VEHICLE SYSTEM
//STOCK
stock GetClosestVehicle(playeridFloat:range//Function of WooTFTW
{
//NEW
new     Float:p_X;
new     
Float:p_Y;
new     
Float:p_Z;
new     
Float:Distance;
new     
Float:PretendentDistance range +1;
new     
Pretendent;
//GET PLAYER
GetPlayerPos(playeridp_Xp_Yp_Z);
for(new 
vehicleid=1vehicleid MAX_VEHICLESvehicleid++)
{
//DISTANCE
Distance GetVehicleDistanceFromPoint(vehicleidp_Xp_Yp_Z);
if(
Distance <= range && Distance <= PretendentDistance)
{
//PERTENDENT
Pretendent vehicleid;
PretendentDistance Distance;
}
}
return 
Pretendent;
}
//BREAK VEHICLE CMD
CMD:breakveh(playeridparams[])
{
new 
vehicleidenginelightsalarmdoorsbonnetbootobjective
vehicleid GetClosestVehicle(playerid1); 
SetTimer("Breaking the vehicle..."30000false);
SetVehicleHealth(vehicleid200);
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
SetVehicleParamsEx(vehicleid001001objective);
SendClientMessage(playeridCOLOR_GREY,"You break the vehicle, now you can do as you wish.");
return 
1;

The code not realy active. Thanks for dear helpers!
Reply
#2

I'll tell you over and over again, to chooe proper titles and explain more...

"Not working" is not describing anything.

Ofcause we could find out whats wrong, but why don't u just provide more info to make it easier for us.
Reply
#3

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
I'll tell you over and over again, to chooe proper titles and explain more...

"Not working" is not describing anything.

Ofcause we could find out whats wrong, but why don't u just provide more info to make it easier for us.
OK
Reply
#4

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
I'll tell you over and over again, to chooe proper titles and explain more...

"Not working" is not describing anything.

Ofcause we could find out whats wrong, but why don't u just provide more info to make it easier for us.
You can fix my code? I don't success, the code work in the pawn but in the game didn't do nothing... why? what's the problem with my code?
Reply
#5

You don't even read his comment...
You are using wrong SetTimer...
Explain your problem, at least try it.
Reply
#6

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
You don't even read his comment...
You are using wrong SetTimer...
Explain your problem, at least try it.
The command dont realy do something...
Reply
#7

I told you that u are using wrong the function SetTimer, Get in the link and see how it works.
Reply
#8

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
I told you that u are using wrong the function SetTimer, Get in the link and see how it works.
I try but not success... thank you anyway!
Reply
#9

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
I told you that u are using wrong the function SetTimer, Get in the link and see how it works.
U can fix for me the cmd please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)