More command help [/changecolor]
#7

Quote:
Originally Posted by hoodline
Посмотреть сообщение
You can't just assume that the person you're sending scripts to uses strtok or has the IsNumeric Function, because half the time they don't and will just complain when they try to compile.

pawn Код:
if (strcmp("/cc", cmdtext, true, 3) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new params[2];
            new totalparams;
            for(new cell;cell<strlen(cmdtext);cell++)
            {
                if(cmdtext[cell]==' ')
                {
                    params[totalparams]=cell+1;
                    totalparams++;
                    if(totalparams==sizeof(params))break;
                }
            }
            if(totalparams!=sizeof(params))return SendClientMessage(playerid,COLOR_NAVY,"USAGE: /cc [Color1] [Color2]");
            ChangeVehicleColor(GetPlayerVehicleID(playerid),strval(cmdtext[params[0]]),strval(cmdtext[params[1]]));
            SendClientMessage(playerid,COLOR_NAVY,"VEHICLE: Your vehicles car color has now been changed.");
        }
        else SendClientMessage(playerid,COLOR_NAVY,"VEHICLE: You must be in a vehicle to change your car color.");
        return 1;
    }
Reply


Messages In This Thread
More command help [/changecolor] - by Kyle. - 20.01.2011, 02:30
Re: More command help [/changecolor] - by [UG]Scripter - 20.01.2011, 02:35
Re: More command help [/changecolor] - by Kyle. - 20.01.2011, 03:09
Re: More command help [/changecolor] - by Tee - 20.01.2011, 03:28
Re: More command help [/changecolor] - by Antonio [G-RP] - 20.01.2011, 03:54
Re: More command help [/changecolor] - by hoodline - 20.01.2011, 04:09
Re: More command help [/changecolor] - by Joe Staff - 20.01.2011, 04:16

Forum Jump:


Users browsing this thread: 2 Guest(s)