Has vehicle no roof? -
thimo - 10.01.2012
So i tried to know if a vehicle has no roof... i got all vehicle ids but i cant use else on this:
pawn Код:
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 461, 462, 463, 468, 471, 424, 430, 448, 446, 452, 457, 472, 473, 481, 484, 485, 486, 493, 509, 510, 521, 522, 523, 530, 531, 539, 571, 572, 581, 586, 595:
{
APlayerData[playerid][Windows] = 3;
GetVehicleParamsEx(vehicleid, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(vehicleid, 0, 1, Alarm, Doors, Bonnet, Boot, Objective);
APlayerData[playerid][EngineStarted] = 0;
APlayerData[playerid][gEngine] = 0;
return 1;
}
}
else
{
GetVehicleParamsEx(vehicleid, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(vehicleid, 0, 1, Alarm, Doors, Bonnet, Boot, Objective);
APlayerData[playerid][EngineStarted] = 0;
APlayerData[playerid][gEngine] = 0;
APlayerData[playerid][Windows] = 1;
}
How CAN i make this work? :S
Re: Has vehicle no roof? -
thimo - 10.01.2012
Y Less that makes no sense...
Re: Has vehicle no roof? -
SuperViper - 10.01.2012
pawn Код:
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 461, 462, 463, 468, 471, 424, 430, 448, 446, 452, 457, 472, 473, 481, 484, 485, 486, 493, 509, 510, 521, 522, 523, 530, 531, 539, 571, 572, 581, 586, 595:
{
APlayerData[playerid][Windows] = 3;
GetVehicleParamsEx(vehicleid, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(vehicleid, 0, 1, Alarm, Doors, Bonnet, Boot, Objective);
APlayerData[playerid][EngineStarted] = 0;
APlayerData[playerid][gEngine] = 0;
return 1;
}
default:
{
GetVehicleParamsEx(vehicleid, Engine, Lights, Alarm, Doors, Bonnet, Boot, Objective);
SetVehicleParamsEx(vehicleid, 0, 1, Alarm, Doors, Bonnet, Boot, Objective);
APlayerData[playerid][EngineStarted] = 0;
APlayerData[playerid][gEngine] = 0;
APlayerData[playerid][Windows] = 1;
}
}
Re: Has vehicle no roof? -
thimo - 10.01.2012
Thanks superviper...
******: Not so good -.-
Re: Has vehicle no roof? -
thimo - 10.01.2012
Anyway it doesnt work... I got this to get if Windows status = 3
pawn Код:
else if(APlayerData[playerid][Windows] == 3)
{
new string[128];
format(string, sizeof(string), "(Open roof)%s: %s", pName, text);
if(IsPlayerInRangeOfPoint(i, 30.0, APlayerData[playerid][X], APlayerData[playerid][Y], APlayerData[playerid][Z]))
{
SendClientMessage(i, COLOR_CHAT1, string);
}
}
Why it aint work?
Offtopic: sry for double post
Re: Has vehicle no roof? - T0pAz - 10.01.2012
Quote:
Originally Posted by thimo
Thanks superviper...
******: Not so good -.-
|
****** is trying to help you and instead of thanking him you are speaking bullshit. Seriously, no room for good people.