08.04.2010, 13:43
Ok i got this command now..
its working fine but only if i am in a car and not with distance..
its working fine but only if i am in a car and not with distance..
Код:
if(strcmp(cmd, "/lock", true) == 0) { //new dist = CheckPlayerDistanceToVehicle(5, playerid, vehicleid); new Float:vx,Float:vy,Float:vz; GetVehiclePos(GetCreatorID(playerid),vx,vy,vz); if(GetCreatorID(vehicleid)!=0) { if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)) || PlayerToPoint(5, playerid,vx,vy,vz)) { PlayerActionMessage(playerid,15.0,"locks the vehicle."); VehicleSystem[GetCreatorID(vehicleid)][locked] = 1; SaveTool(); } else { }} else { SendClientMessage(playerid,COLOR_GREY,"You're not near your vehicle!"); } return 1; }