17.05.2013, 05:11
i need these commands converted to strcmp format please, rep will be given to the first person to do so
Код:
CMD:hitch(playerid, params[]) { if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) SendClientMessage(playerid, COLOR_GREY, "You are already towing a Trailer/Vehicle."); new Float:PPPX,Float:PPPY,Float:PPPZ; GetPlayerPos(playerid,PPPX,PPPY,PPPZ); new Float:VVVX,Float:VVVY,Float:VVVZ; new Found=0; new vid=0; while((vid<MAX_VEHICLES)&&(!Found)) { vid++; GetVehiclePos(vid,VVVX,VVVY,VVVZ); if ((floatabs(PPPX-VVVX)<7.0)&&(floatabs(PPPY-VVVY)<7.0)&&(floatabs(PPPZ-VVVZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid))) { Found=1; AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid)); } } if (!Found) { SendClientMessage(playerid,COLOR_GREY,"There is no vehicle in range."); } return 1; } CMD:unhitch(playerid, params[]) { #pragma unused params new veh = GetPlayerVehicleID(playerid); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "You must be in a vehicle to do this."); if(!IsTrailerAttachedToVehicle(veh)) return SendClientMessageEx(playerid, COLOR_GRAD2, "You do not have a trailer attached to your vehicle."); DetachTrailerFromVehicle(veh); SendClientMessageEx(playerid, COLOR_GRAD2, "Your trailer has been detached from your vehicle."); return 1; }