06.12.2009, 07:02
does this seem retarded?
I sent you the whole like PlayerToPoint codes. from line 400 to line 443.
And this was the one u told me to change, ill send u this just incase i fucked up on a bracket or someshit.
Код:
GetObjectPos(C4[playerid], bx[playerid], by[playerid], bz[playerid]); if(PlayerToPoint(10, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], "i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(20, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(30, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(40, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(50, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(60, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(70, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(80, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(90, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(100, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(110, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(120, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(130, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(140, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(150, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(160, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(170, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(180, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(190, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(200, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(210, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(220, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(230, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(240, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(250, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(260, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(270, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(280, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(290, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(300, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(310, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(320, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(330, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(340, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(350, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else if(PlayerToPoint(360, playerid, bx[playerid], by[playerid], bz[playerid])){ TextDrawSetString(Meter1[playerid], " i"); TextDrawSetString(Meter3[playerid], " Range");} else { TextDrawSetString(Meter3[playerid], "~R~Out Of Range"); TextDrawSetString(Meter1[playerid], "~R~ i"); } return 1; }
And this was the one u told me to change, ill send u this just incase i fucked up on a bracket or someshit.
Код:
if(strcmp(cmd, "/getmats", true) == 0) { if(PlayerToPoint(3.0,playerid,GunJob[BuyPackagesX],GunJob[BuyPackagesY],GunJob[BuyPackagesZ])) { if(MatsHolding[playerid] >= 10)return SendClientMessage(playerid, COLOR_GREY, "[Error:] You can not hold any more packages"); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "[Usages:] /getmats [amount]"); new moneys; moneys = strval(tmp); if(moneys < 1 || moneys > 10) return SendClientMessage(playerid, COLOR_GREY, "[Error:] Maximum number of packages is 10"); new price = moneys * 100; if(GetPlayerCash(playerid) > price) { format(string, sizeof(string), "[Info:] You got %d materials packages - Cost: $%d", moneys, price); SendClientMessage(playerid, COLOR_WHITE, string); GivePlayerCash(playerid, - price); MatsHolding[playerid] = moneys; } else { format(string, sizeof(string), "[Error:] You do not have $%d", price); SendClientMessage(playerid, COLOR_GREY, string); } else return SendClientMessage(playerid, COLOR_GREY, "[Error:] You are not at the materials package place"); } return true; } if(strcmp(cmd, "/sellmats", true) == 0) { if(PlayerToPoint(3.0,playerid,GunJob[DeliverX],GunJob[DeliverY],GunJob[DeliverZ])) { if(MatsHolding[playerid] > 0) { new payout = (50)*(MatsHolding[playerid]); format(string, sizeof(string), "[Info:] Materials packages delivered, you got %d materials", payout); SendClientMessage(playerid, COLOR_WHITE, string); PlayerInfo[playerid][pMaterials] += payout; MatsHolding[playerid] = 0; } else SendClientMessage(playerid, COLOR_GREY, "[Error:] You do not have any packages"); else SendClientMessage(playerid, COLOR_GREY, "[Error:] You are not at the materials dropoff place"); else SendClientMessage(playerid, COLOR_GREY, "[Error:] Invalid usage"); } } return 1; }