02.07.2012, 18:34
Hey so i am trying to color my car in game and when i do it the color of my car changes but when i log out and log back in it changes back to the color it was..
If you need any more code just ask
Thanks
pawn Код:
command(ocarcolour, playerid, params[])
{
new col1, col2, vehslot;
if(sscanf(params, "ddd", col1, col2, vehslot))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /ocarcolor [colour1] [colour2] [1-5]");
}
else
{
switch(vehslot)
{
case 1:
{
if(col1 >= 0 && col1 < 300 || col2 >= 0 && col2 < 300)
{
if(Player[playerid][PlayerCarModel] > 0)
{
if(Player[playerid][HasSprayCans] >= 1 || Player[playerid][VipRank] >= 2)
{
ChangeVehicleColor(Player[playerid][CarLinkID], col1, col2);
Player[playerid][CarCol1] = col1;
Player[playerid][CarCol2] = col2;
if(Player[playerid][VipRank] < 2)
{
Player[playerid][HasSprayCans]--;
}
}
else
{
SendClientMessage(playerid, WHITE, "You have no spraycans left.");
}
}
}
else
{
SendClientMessage(playerid, WHITE, "Invalid colour, colours are from 0-300.");
}
}
}
}
}
Thanks