pass command to dialog
#1


if someone can help me to pass this command to dialog, I thank you


PHP код:
CMD:repair(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid20.02180.9875,-1979.7583,13.5606)) //Optional - CHANGE
    
{
        new 
string[128], item[32], pIDmName[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
        if(
sscanf(params"s[32] "item)) {
            
SendClientMessage(playerid, -1"USAGE: /repair [option]");
            
SendClientMessage(playerid, -1"Options: bodykit, engine");
            return 
1;
        }
        if(
strcmp(item,"bodykit",true) == 0) {
            if (
sscanf(params"s[32]u"itempID)) return SendClientMessage(playerid, -1"USAGE: /repair bodykit [ID/Name]");
            
GetPlayerName(playeridmNamesizeof(mName));
            
GetPlayerName(pIDpNamesizeof(pName));
            
format(stringsizeof(string), "%s has offered you a repair of bodykit on your car!"mName);
            
SendClientMessage(pIDCOLOR_LIGHTBLUEstring);
            
SendClientMessage(pIDCOLOR_LIGHTBLUE"Use: /acceptmeh to accept that offer!");
            
format(stringsizeof(string), "You offered %s to repair bodykit on his vehicle."pName);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            
Service[pID][1] = 1;
        }
        else if(
strcmp(item,"engine",true) == 0) {
            if(
sscanf(params"s[32]u",itempID)) return SendClientMessage(playerid, -1"USAGE: /repair engine [ID/Name]");
            
GetPlayerName(playeridmNamesizeof(mName));
            
GetPlayerName(pIDpNamesizeof(pName));
            
format(stringsizeof(string), "%s has offered you a repair of engine on your vehicle!"mName);
            
SendClientMessage(pIDCOLOR_LIGHTBLUEstring);
            
SendClientMessage(pIDCOLOR_LIGHTBLUE"Use: /acceptmeh to accept that offer!");
            
format(stringsizeof(string), "You offered %s to repair engine on his vehicle."pName);
            
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
            
Service[pID][2] = 1;
        }
    }
    else return 
SendClientMessage(playeridCOLOR_RED"You must be in the garage to repair vehicles!");
    return 
1;

Reply


Messages In This Thread
pass command to dialog - by SingleFFG - 07.04.2018, 19:40
Re: pass command to dialog - by Mugala - 07.04.2018, 22:27
Re: pass command to dialog - by Logic_ - 07.04.2018, 23:06

Forum Jump:


Users browsing this thread: 1 Guest(s)