15.04.2014, 16:49
why do i get Server Unknown command on enterin the Slot Number.
Код:
if(strcmp(cmd, "/sellcar", true) == 0) { new car1 = PlayerInfo[playerid][CarLinkID]; new car2 = PlayerInfo[playerid][Car2LinkID]; if(car1 == 0 && car2 == 0) return SendClientMessage(playerid, COLOR_GREY, " You do not own a car."); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellcar [playerid/PartOfName] [price] [Vehicle Number(1 - 2)]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellcar [playerid/PartOfName] [price] [Vehicle Number(1 - 2)]"); return 1; } new price = strvalEx(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellcar [playerid/PartOfName] [price] [Vehicle Number(1 - 2)]"); return 1; } new stuff = strvalEx(tmp); if(price < 50000 || price > 15000000) return SendClientMessage(playerid, COLOR_GREY, " Price cannot be lower than $50,000 or higher than $15,000,000."); if(playerid == giveplayerid) { return SendClientMessage(playerid, COLOR_GREY, " You cannot sell yourself a car."); } if(PlayerInfo[giveplayerid][CarLinkID] != 0 && PlayerInfo[giveplayerid][Car2LinkID] != 0) { return SendClientMessage(playerid, COLOR_GREY, " That player already owns two cars."); } if(!ProxDetectorS(10.0, playerid, giveplayerid)) { return SendClientMessage(playerid, COLOR_GREY, " That player is not near you."); } if( stuff == 1 ) { sellcarvehicle = PlayerInfo[playerid][CarLinkID]; } else if( stuff == 2 ) { sellcarvehicle = PlayerInfo[playerid][Car2LinkID]; } format(string, sizeof(string), "* You offered %s to buy your car (%s) for $%d.",RemoveUnderScore(giveplayerid),vehName[sellcarvehicle-400],price); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s wants to sell you a car (%s) for $%d, (type /accept car) to accept.",RemoveUnderScore(playerid),vehName[sellcarvehicle-400],price); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string),"* %s hands %s the contract to their car.",RemoveUnderScore(playerid),RemoveUnderScore(giveplayerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); CarOffer[giveplayerid] = playerid; CarPrice[giveplayerid] = price; CarID[giveplayerid] = sellcarvehicle; CarSlot[giveplayerid] = stuff; return 1; }