SA-MP Forums Archive
||===Help with CMD: (Params)===|| - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ||===Help with CMD: (Params)===|| (/showthread.php?tid=305083)



||===Help with CMD: (Params)===|| - nGen.SoNNy - 21.12.2011

Hello guys!
How cand i make this to work? CMD: start lvrace
I dont' want to type in game /start lvrace ! I want to type just /lvrace !

It's like i want to use params in CMD...)
Код:
CMD:start lvrace(playerid, params[])
{
    if(AutomaticRace == true) return SendError(playerid, "Not possible. Automatic race is enabled!");
    if(RaceBusy == 0x01 || RaceStarted == 1) return SendError(playerid, "There's a race currently. Wait first till race ends!");
    LoadRace(playerid, params);
    return ( 1 );
}

and i will use:
CMD:lvrace( playerid, params[] ) return cmd_start lvrace( playerid, params );//ShortCut Race:)



Re: ||===Help with CMD: (Params)===|| - [MG]Dimi - 21.12.2011

pawn Код:
CMD:start(playerid, params[])
{
    if(!strcmp(params,"lvrace",true))
    {
        if(AutomaticRace == true) return SendError(playerid, "Not possible. Automatic race is enabled!");
        if(RaceBusy == 0x01 || RaceStarted == 1) return SendError(playerid, "There's a race currently. Wait first till race ends!");
        LoadRace(playerid, params);
    }
    return 1;
}

CMD:lvrace(playerid,params[]) return cmd_start(playerid,"lvrace");//ShortCut Race:)



Re: ||===Help with CMD: (Params)===|| - nGen.SoNNy - 21.12.2011

Thx mate