SA-MP Forums Archive
How to make a command like this .. - 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: How to make a command like this .. (/showthread.php?tid=316377)



How to make a command like this .. - Thunderbolt - 06.02.2012

Hello,

I want to make a command like this:

/job <jobname>

Like,

/job mechanic

/job medic

/job lawyer

etc ..


Re: How to make a command like this .. - niels44 - 06.02.2012

use this link, this teaches you how to make classes, im not sure if you want to make classes but it could be a start:http://forum.sa-mp.com/showthread.ph...highlight=team


Re: How to make a command like this .. - Konstantinos - 06.02.2012

pawn Код:
CMD:job( playerid, params[ ] )
{
    if( isnull( params ) ) return SendClientMessage( playerid, -1, "usage: /job <mechanic/medic/lawyer..more>" );
    if( strcmp( params, "mechanic", true ) == 0 )
    {
        // Code for mechanic
    }
    else if( strcmp( params, "medic", true ) == 0 )
    {
        // Code for medic
    }
    else if( strcmp( params, "lawyer", true ) == 0 )
    {
        // Code for lawyer
    }
    // Rest of Jobs..
    else SendClientMessage( playerid, -1, "usage: /job <mechanic/medic/lawyer..more>" );
    return 1;
}



Re: How to make a command like this .. - Thunderbolt - 06.02.2012

Oh, yes!! That one, thank you Dwane <3.


Re: How to make a command like this .. - Konstantinos - 06.02.2012

lol no problem