03.01.2017, 00:27
How to make street email system for roleplay server, phone street for roleplay server, picklock (stealcar), breakin house (rob house) systems? It's hard to make it?
stock GetClosestVehicle(playerid, Float:range) //Function of WooTFTW
{
new Float:p_X;
new Float:p_Y;
new Float:p_Z;
new Float:Distance;
new Float:PretendentDistance = range +1;
new Pretendent;
GetPlayerPos(playerid, p_X, p_Y, p_Z);
for(new vehicleid=1; vehicleid < MAX_VEHICLES; vehicleid++)
{
Distance = GetVehicleDistanceFromPoint(vehicleid, p_X, p_Y, p_Z);
if(Distance <= range && Distance <= PretendentDistance)
{
Pretendent = vehicleid;
PretendentDistance = Distance;
}
}
return Pretendent;
}
CMD:stealcar(playerid, params[])
{
new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
vehicleid = GetClosestVehicle(playerid, 1);
SetVehicleParamsEx(vehicleid,engine,lights,alarm,0,bonnet,boot,objective);
SendClientMessage(playerid, -1,"You opened the doors of the car/cars in a radio of 1");
return 1;
}