command problem
#1

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 !");
					}
				}
			}
	    }
	}
Reply
#2

Sorry, i didn't exactly understand your question. Do you want a Command to change Vehicle?
Reply
#3

so,my carownership was in dialog all,i mean the /dveh with color model park anything was in a DIALOG that appear,i modified the wall sistem to be in diffrent commands(i mean i modified the system to be no more in DIALOG), /park /fix(1-3),and now i have a problem to MODEL command,i can`t transform from DIALOG style to a cmd style,strcmp, like /model [newmodel],like this i want to be,command originally is in dialog,but i can`t modifie it to be in strcmp....

"/model [newmodel]" and newmodel reprezent the newmodelofvehicle
Reply
#4

The original command in DIALOG is above,can u modifie it to be in strcmp? for example like /pay command,like that to be,
"/model [newmodel]"
thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)