Choosing random mission
#4

Correction:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/work", cmdtext, true))
    {
        new rand = random(3); // make this as high as you want.. depends on how much missions you want.
        switch(rand)
    {
        case 0:
            {
                SendClientMessage(playerid, 0xFFFF00AA,"You are delivering Waste from Los Santos Airport to Landfill");
                SetPlayerCheckpoint(playerid, -694.9723, -1906.2748, 11.6886, 10.0);
            {
            case 1:
            {
                //other stuff here
            }
            case 2:
            {
                // any other stuff here
            }
    }
        return 1;
    }
    return 0;
}
Much better imo
And yes, indentation is fucked.. CBA to fix it up
Reply


Messages In This Thread
Choosing random mission - by Haydz - 19.09.2010, 11:13
Re: Choosing random mission - by MadeMan - 19.09.2010, 11:23
Re: Choosing random mission - by Jochemd - 19.09.2010, 11:27
Re: Choosing random mission - by LarzI - 19.09.2010, 11:40
Re: Choosing random mission - by Mike_Peterson - 19.09.2010, 15:55
Re: Choosing random mission - by LarzI - 19.09.2010, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)