16.04.2013, 12:06
Hey I created this command :
Always when I do /getdeliver in the right position this is tell me that I'm not in the right place ... What to do !?
Code:
CMD:getdeliver(playerid, params[]) { if (PlayerInfo[playerid][pJob] != 0 && PlayerInfo[playerid][pJob2] != 0) { SendClientMessageEx(playerid,COLOR_GREY," You are not working in other job already [For work for that /quitjob]"); return 1; } new vehicleid = GetPlayerVehicleID(playerid); if(!(IsADeliverCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)) { SendClientMessageEx(playerid,COLOR_GREY," You need to be driving a Deliver in Deliver Truck!"); return 1; } new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); if(!IsPlayerInRangeOfPoint(playerid,0,3084.1438,603.6863,3.0991) && !IsPlayerInRangeOfPoint(playerid,0,3088.3657,600.0442,3.0991) && !IsPlayerInRangeOfPoint(playerid,0,3091.9426,596.9791,3.0991) && !IsPlayerInRangeOfPoint(playerid,0,3095.5442, 593.9920, 3.0991)) return SendClientMessage(playerid,COLOR_RED,"You're not at the right place"); if(GetPVarInt(playerid, "Delivering") > 0) { SendClientMessageEx(playerid, COLOR_GREY, " You are already delivering the illeagel stuff!"); return 1; } { SetPlayerCheckpoint(playerid, 2784.85, -2455.96, 13.63, 3.0); return 1; }