12.06.2010, 12:28
Hello, i want to make an 'or' command but it don't work,
Script :
Script :
Quote:
if(strcmp(cmd,"/materials",true)==0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pJob] != 9) { SendClientMessage(playerid,COLOR_GREY," You are not a Arms Dealer !"); return 1; } new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /materials [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: Get, Deliver."); return 1; } if(strcmp(x_nr,"get",true) == 0) { if(PlayerToPoint(3.0,playerid,2386.5525,-2016.7218,13.5474)) // I want to make here or (||) pos : 1423.0286,-1318.6818,13.5547 but it wont work { if(MatsHolding[playerid] >= 10) { SendClientMessage(playerid, COLOR_GREY, " You can't hold any more Materials Packages !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /materials get [ammount]"); return 1; } moneys = strval(tmp); if(moneys < 1 || moneys > 10) { SendClientMessage(playerid, COLOR_GREY, " Package Number can't be below 1 or higher then 10 !"); return 1; } new price = moneys * 100; if(GetPlayerMoney(playerid) > price) { format(string, sizeof(string), "* You bought %d Materials Packages for $%d.", moneys, price); SetPlayerCheckpoint(playerid, 2287.5806,-1106.5895,37.9766, 3.0); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GivePlayerMoney(playerid, - price); MatsHolding[playerid] = moneys; } else { format(string, sizeof(string), " You can't afford the $%d !", price); SendClientMessage(playerid, COLOR_GREY, string); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not at the Materials Pickup in Los Santos behind Ammu-Nation!"); return 1; } } |