02.11.2014, 07:56
(
Последний раз редактировалось buburuzu19; 02.11.2014 в 09:08.
)
FIXED
playerVariables[playerid][pCarColour1][0] = inputtext[playerid];
playerVariables[playerid][pCarColour1][0] = strval(inputtext);
//and also one more line needs change --
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarColour1 = '%d' WHERE playerID = '%d'", strval(inputtext), playerVariables[playerid][pInternalID]);
case 787:
{
if(response)
{
if(!isnull(inputtext))
{
new input1; // you may change this variable to any name you want
if(sscanf(inputtext,"d",input1)) // we only accept numbers and store it to input1
{
return SendClientMessage(playerid,-1,"We only accept numbers"); // your message if the player failed to put the right input
}
// you can also add range restrictions eg. if(input1>20)return SendClientMessage
new saveQuery[600];
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == playerVariables[playerid][pCarID1])
{
format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarColour1 = '%d' WHERE playerID = '%d'", input1, playerVariables[playerid][pInternalID]);// inputtext changed to input1
mysql_tquery(handle,saveQuery);
SetVehicleToRespawn(vehicleid);
playerVariables[playerid][pCarColour1][0] = input1; // inputtext changed to input1
SendClientMessage(playerid, COLOR_YELLOW, "You've succesful added x1 hidden to your slot 1.");
ChangeVehicleColor(vehicleid, playerVariables[playerid][pCarColour1][0]);
}
}
}
}
}
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)return SendClientMessage(.....);
if(GetPlayerVehicleID(playerid)!=playerVariables[playerid][Vehicleid])return SendClientmessage(playerid,-1,"You must be in your own car");// change the playerVariables[playerid][Vehicleid] to the player variable where you save the owned car of the player
// above brozues code