- 0
Pawno - /carcolor
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
PrtSc
Problema intalnita (descriere): Pot da /carcolor 1 sau 2 si pana la orice numar vreau exemplu: 2222246 + imi da cu hidden! , As dori sa ma ajutati sa pot fi folosit doar pana la [1-225]
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): in jos
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Nu.
CMD:carcolor11(playerid, params[])
Edited by Kallen{
new saveQuery[600];
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new color1,color2;
if(sscanf(params, "ii",color1,color2)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/carcolor [color1] [color2]");
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == playerVariables[playerid][pCarID1])
{
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarColour1 = '%d', playerCarColour2 = '%d' WHERE playerID = '%d'",color1, color2, playerVariables[playerid][pInternalID]);
mysql_tquery(handle,saveQuery);
//SetVehicleToRespawn(vehicleid);
playerVariables[playerid][pCarColour1][0] = color1;
playerVariables[playerid][pCarColour1][1] = color2;
SendClientMessage(playerid, COLOR_YELLOW, "You've succesfull change car 1 colors.");
ChangeVehicleColor(vehicleid, playerVariables[playerid][pCarColour1][0],playerVariables[playerid][pCarColour1][1]);
}
else if(vehicleid == playerVariables[playerid][pCarID2])
{
ChangeVehicleColor(vehicleid, color1, color2);
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarColour21 = '%d', playerCarColour22 = '%d' WHERE playerID = '%d'",color1, color2, playerVariables[playerid][pInternalID]);
mysql_tquery(handle,saveQuery);
//SetVehicleToRespawn(vehicleid);
playerVariables[playerid][pCarColour2][0] = color1;
playerVariables[playerid][pCarColour2][1] = color2;
SendClientMessage(playerid, COLOR_YELLOW, "You've succesfull change car 2 colors.");
}
else if(vehicleid == playerVariables[playerid][pCarID3])
{
ChangeVehicleColor(vehicleid, color1, color2);
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarColor31 = '%d', playerCarColor32 = '%d' WHERE playerID = '%d'",color1, color2, playerVariables[playerid][pInternalID]);
mysql_tquery(handle,saveQuery);
//SetVehicleToRespawn(vehicleid);
playerVariables[playerid][pCarColour3][0] = color1;
playerVariables[playerid][pCarColour3][1] = color2;
SendClientMessage(playerid, COLOR_YELLOW, "You've succesfull change car 3 colors.");
}
else if(vehicleid == playerVariables[playerid][pCarID4])
{
ChangeVehicleColor(vehicleid, color1, color2);
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarColor41 = '%d', playerCarColor42 = '%d' WHERE playerID = '%d'",color1, color2, playerVariables[playerid][pInternalID]);
mysql_tquery(handle,saveQuery);
//SetVehicleToRespawn(vehicleid);
playerVariables[playerid][pCarColour4][0] = color1;
playerVariables[playerid][pCarColour4][1] = color2;
SendClientMessage(playerid, COLOR_YELLOW, "You've succesfull change car 4 colors.");
}
}
}
return 1;
}
Pawno
2 answers to this question
Recommended Posts