How to make a command like this ..
#1

Hello,

I want to make a command like this:

/job <jobname>

Like,

/job mechanic

/job medic

/job lawyer

etc ..
Reply
#2

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
Reply
#3

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;
}
Reply
#4

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

lol no problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)