How to do this
#10

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(playeriddialogidresponselistiteminputtext[]){
    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;

Reply


Messages In This Thread
How to do this - by Astonish - 15.05.2018, 20:37
Re: How to do this - by Astonish - 15.05.2018, 20:39
Re: How to do this - by JasonRiggs - 15.05.2018, 20:46
Re: How to do this - by Astonish - 15.05.2018, 20:56
Re: How to do this - by Astonish - 15.05.2018, 21:38
Re: How to do this - by Ha$H_Sexyboy - 15.05.2018, 23:34
Re: How to do this - by Astonish - 16.05.2018, 03:20
Re: How to do this - by Astonish - 16.05.2018, 04:18
Re: How to do this - by Astonish - 16.05.2018, 10:08
Re: How to do this - by CodeStyle175 - 16.05.2018, 12:07

Forum Jump:


Users browsing this thread: 2 Guest(s)