16.05.2018, 12:07
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
enum{
d_tuneveh
};
#define scm SendClientMessage
new PlayerFixVeh[MAX_PLAYERS];
CMD:fixveh(pid){
if(GetPlayerState(pid)!=PLAYER_STATE_DRIVER)return scm(pid,-1,"You are not driver!");
PlayerFixVeh[pid]=GetPlayerVehicleID(pid);
ShowPlayerDialog(pid,d_tuneveh,DIALOG_STYLE_TABLIST_HEADERS,"Select An Option",
"Option\tCost\n{DEDEDE}Engine\t{54CC6A}$86\n{DEDEDE}Bodywork (+ tires)\t{54CC6A}$275\n{DEDEDE}Tires\t{54CC6A}$0\n{DEDEDE}Full repair\t{54CC6A}$361\n{DEDEDE}Healights\t{54CC6A}$50","Select","Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
new pid=playerid;
switch(dialogid){
case d_tuneveh:{
if(!response)return 0;
new a1,a2,a3,a4;
switch(listitem){
case 0:{
SetVehicleHealth(PlayerFixVeh[pid],1000.0);
scm(pid,-1,"Engine fixed.");
}
case 1:{
}
case 2:{
}
case 3:{
}
case 4:{
}
}
}
}
return 1;
}