17.01.2013, 12:05
Hy everyone,i have a problem,my carownership was created in dialog,all the sistem was in dialog,finally i have modified all the commands except the MODEL(change the model of personalvehicle) command,how cand i transform that model dialog in a command ,something like this "/model [newmodel]" ...? can u help me guys?( Sorry for my bad english)
Код:
if(dialogid==DIALOGVMODEL+1) { if(response) { if(strlen(inputtext)) { new model; model = strval(inputtext); if(model < 400 || model > 611) { SendClientMessage(playerid, COLOR_WHITE, " Id-ul modelului trebuie sa fie cuprins intre 400 si 611"); new tittle[128]; new carkey = PlayerInfo[playerid][pPcarkey]; format(tittle,128,"%s", CarInfo[carkey][cDescription]); ShowPlayerDialog(playerid, DIALOGVMODEL+1,DIALOG_STYLE_INPUT,tittle,"Type in box vehicle model id:","Manage","Close"); return 1; } else { if(!NotModel(model)) { CarInfo[PlayerInfo[playerid][pPcarkey]][cModel]=model; format(string, sizeof(string), " [%s]: {3D9AD4}New vehicle model saved.",CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription]); SendClientMessage(playerid, COLOR_YELLOW, string); format(CarInfo[PlayerInfo[playerid][pPcarkey]][cDescription], 32, "%s",vehName[model-400]); OnCarUpdate(); SavePlayerData(playerid); } else { new tittle[128]; new carkey= PlayerInfo[playerid][pPcarkey]; format(tittle,128,"%s", CarInfo[carkey][cDescription]); ShowPlayerDialog(playerid, DIALOGVMODEL+1,DIALOG_STYLE_INPUT,tittle,"Type in box vehicle model id:","Manage","Close"); SendClientMessage(playerid, COLOR_GREY, " Acest model este interzis !"); } } } } }