SA-MP Forums Archive
/paint - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /paint (/showthread.php?tid=249052)



/paint - ColdIce - 16.04.2011

Hello! Is someone out there extremely bored that wants to script a little? I need a small simple script!

U do /paint and then ur car will change color, just some random color! Must be random!
Is this possible? If scripter wants, he can add his name in the script and I will keep it there!


Re: /paint - [L3th4l] - 16.04.2011

pawn Код:
CMD:paint(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) return 0;

    return ChangeVehicleColor(GetPlayerVehicleID(playerid), random(255), random(255));
}



Re: /paint - ColdIce - 17.04.2011

Oh thank you! And where shall I put it in pawno? Under what line?


Re: /paint - ColdIce - 17.04.2011

http://myndahysing.net/upload/261303001884.png


Re: /paint - [L3th4l] - 17.04.2011

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/paint", true) == 0)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFF, "You must be in a vehicle!");

        return ChangeVehicleColor(GetPlayerVehicleID(playerid), random(255), random(255));
    }
    return 0;
}
Add that or replace it if you already have "OnPlayerCommandText"
Also delete the previous command.


Re: /paint - ColdIce - 17.04.2011

alright, u sure u dont want me to add credits for u?