/v paintjob and /v sell dont wanna work -
Shayaziz - 01.08.2012
Hello, i have an roleplay server that is working pretty good, the only thing we have problem with is the /v sell and /v paintjob we have no idea why it dosnt work but everytime we try it it says ''You don't have a vehicle to respray'' please help me
Respuesta: /v paintjob and /v sell dont wanna work -
HarlemSAMP - 01.08.2012
we do not have any idea either, post your code in order so we can help you
Re: /v paintjob and /v sell dont wanna work -
Shayaziz - 02.08.2012
now the /v sell works but here is the /v paintjob code
Код:
else if(strcmp(x_nr,"paintjob",true) == 0)
{
if(PlayerInfo[playerid][pPcarkey] == 9999 || PlayerInfo[playerid][pPcarkey2] == 9999 || PlayerInfo[playerid][pPcarkey3] == 9999 || PlayerInfo[playerid][pPcarkey4] == 9999 || PlayerInfo[playerid][pPcarkey5] == 9999)
{
SendClientMessage(playerid, COLOR_GREY," You don't have a vehicle to respray.");
return 1;
}
if(!IsAtDealership(playerid) && !IsAtPaySpray(playerid))
{
SendClientMessage(playerid, COLOR_GREY,"* You must be at a Dealership or a Pay'n'Spray to do this!");
return 1;
}
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GREY," You don't have enough money for vehicle respray.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v paintjob [paintjob(0-3)]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 && color1 > 3)
{
SendClientMessage(playerid, COLOR_GREY, " Wrong color id!");
return 1;
}
new vehid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { vehid = PlayerInfo[playerid][pPcarkey3]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey4]) { vehid = PlayerInfo[playerid][pPcarkey4]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey5]) { vehid = PlayerInfo[playerid][pPcarkey5]; }
else { return 1; }
if(IsPlayerInVehicle(playerid, vehid))
{
CarInfo[vehid][cPaintjob] = color1;
SafeGivePlayerMoney(playerid, -5000);
GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$5000", 5000, 1);
ChangeVehiclePaintjob(vehid, color1);
OnPropUpdate(4,vehid);
OnPlayerUpdateEx(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]");
SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-2), sell, sellto, color, paintjob");
return 1;
}
}
return 1;
}
Re: /v paintjob and /v sell dont wanna work -
Shayaziz - 02.08.2012
please help me with this problem!
Re: /v paintjob and /v sell dont wanna work -
Shayaziz - 02.08.2012
i really need help with this!
Re: /v paintjob and /v sell dont wanna work -
The__ - 02.08.2012
Well what does /v paintjob say ?
Re: /v paintjob and /v sell dont wanna work -
Shayaziz - 02.08.2012
when someone does it it just say ''You don't have a vehicle to respray''
Re: /v paintjob and /v sell dont wanna work -
Shayaziz - 03.08.2012
what is the problem?
Re: /v paintjob and /v sell dont wanna work -
new121 - 03.08.2012
PHP код:
if(PlayerInfo[playerid][pPcarkey] == 9999 || PlayerInfo[playerid][pPcarkey2] == 9999 || PlayerInfo[playerid][pPcarkey3] == 9999 || PlayerInfo[playerid][pPcarkey4] == 9999 || PlayerInfo[playerid][pPcarkey5] == 9999)
That is the line that is bugged I think try changing all of the || to && because that line will make it so if you do not own five cars you can't paint any of them.
Re: /v paintjob and /v sell dont wanna work -
Shayaziz - 03.08.2012
didnt work, it still says ''You don't have a vehicle to respray''