CarColour doesn't function good!
#9

Quote:
Originally Posted by Macluawn
Посмотреть сообщение
it actually doesn't matter what he returns at the end of it.
It does matter.

https://sampwiki.blast.hk/wiki/Category:Scripting_Callbacks

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], idx;
    cmd = strtok(cmdtext, idx);
    if (strcmp("/carcolour", cmd, true) == 0)
    {
        new Colour1[128];
        new Colour2[128];
        new currentveh;
        Colour1 = strtok(cmdtext, idx);
        Colour2 = strrest(cmdtext, idx);
        currentveh = GetPlayerVehicleID(playerid);
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,RED,"You're not in a car.");
        if(IsPlayerInAnyVehicle(playerid))
        {
            if (!strval(Colour1) || strval(Colour1)> 255)
            {
                SendClientMessage(playerid, YELLOW, "Invalid colour1.");
                return 1;
            }
            else if (!strval(Colour2) || strval(Colour2) > 255)
            {
                SendClientMessage(playerid, YELLOW, "Invalid colour2.");
                return 1;
            }
            else
            {
                ChangeVehicleColor(currentveh, strval(Colour1), strval(Colour2));
            }
        }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
What's wrong with it ? - by Yaszine - 29.12.2010, 19:01
Re : CarColour doesn't function good! - by Yaszine - 29.12.2010, 19:35
Re: CarColour doesn't function good! - by Mean - 29.12.2010, 19:44
Re : Re: CarColour doesn't function good! - by Yaszine - 30.12.2010, 10:34
Re: CarColour doesn't function good! - by MadeMan - 30.12.2010, 10:50
Re : Re: CarColour doesn't function good! - by Yaszine - 30.12.2010, 11:06
Re: CarColour doesn't function good! - by Macluawn - 30.12.2010, 11:09
Re : CarColour doesn't function good! - by Yaszine - 30.12.2010, 11:11
Re: CarColour doesn't function good! - by MadeMan - 30.12.2010, 11:52
Re : CarColour doesn't function good! - by Yaszine - 30.12.2010, 12:17

Forum Jump:


Users browsing this thread: 4 Guest(s)