12.06.2014, 20:37
Код:
SERVER: Unknown command. Please use /help to list all available commands
This is script:
Код:
CMD:dathang(playerid, params[]) { new string[128], soluong; new bizid = PlayerInfo[playerid][pPbiskey]; if(PlayerInfo[playerid][pBRank] != 6) { SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai la chu cua hang."); return 1; } else { if(!IsPlayerInRangeOfPoint(playerid,100,BizzInfo[bizid][bExitX],BizzInfo[bizid][bExitY],BizzInfo[bizid][bExitZ])) { SendClientMessage(playerid, COLOR_GREY, " Ban khong o trong cua hang cua ban!"); return 1; } else { if(sscanf(params, "d", soluong)) { SendClientMessageEx(playerid, COLOR_GREY, "SUDUNG: /dathang [so luong]"); return 1; } else { if(UseGetProdsTimer[playerid]) { SendClientMessage(playerid,COLOR_GREY," Ban can cho doi 30 phut sau moi co the lay hang tiep!"); return 1; } else { if(soluong < 100 || soluong > 2000) { SendClientMessageEx(playerid, COLOR_GRAD2, "So luong phai nam trong gioi han tu 100 toi 2000."); return 1; } else { if(bizid == INVALID_BUSINESSES_ID) { SendClientMessageEx(playerid, COLOR_GREY, "Ban khong so huu cua hang nao."); return 1; } else { BizzInfo[bizid][bDelivProd] += soluong; BizzInfo[bizid][bPriceProd] += soluong*23; if(BizzInfo[bizid][bBizBank] < BizzInfo[bizid][bPriceProd]) { SendClientMessage( playerid, COLOR_GREY, "Cua hang cua ban khong du tien de mua san pham!"); return 1; } else { format( string, sizeof( string ), "Ban da mua thanh cong %d san pham voi gia $%d.", soluong, BizzInfo[bizid][bPriceProd]); SendClientMessage( playerid, COLOR_LIGHTBLUE, string); SendClientMessage( playerid, COLOR_YELLOW, "San pham cua ban se duoc chuyen den trong vong 10 phut."); SetTimerEx("FillingBizz", 600000, false, "i", playerid); UseGetProdsTimer[playerid] = true; SetTimerEx("UseGetProds", 1800000, false,"i",playerid); SaveBusiness(bizid); return 1; } } } } } } } }