20.06.2010, 18:52
how can i add cars for some of my factions? im using raven's roleplay v2.5 atm
OnGameModeInit(){ ... AddStaticVehicleEx(463,694.8008,-470.2188,15.8761,88.6982,114,114,30000); // Freeway 7 AddStaticVehicleEx(463,694.9393,-473.1948,15.8766,94.6246,114,114,30000); // Freeway 8 AddStaticVehicleEx(463,708.5647,-467.8399,15.8754,271.5996,114,114,30000); // Freeway 9 AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // Freeway 10 factionCar1 = AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // New LA Vice car we are adding, yay! }
public IsAGangCar5(carid) { if((carid >= 17 && carid <= 18) || (carid == 44) || (carid == 134) || (carid == 1359) || (carid == factionCar1) ) // we edited this line { return 1; } return 0; }
Originally Posted by ledzep
After a quick look through the script, it looks very much like your run of the mill GF edit, so adding faction cars will not be very simple for a beginner.
Since I guess you do not want to count hundreds of lines of messy code, we will create a variable to store the new vehicle's vehicleid. What you have to do is store the vehicleid of the new faction car you want to add in some variable like so: Код:
OnGameModeInit(){ ... AddStaticVehicleEx(463,694.8008,-470.2188,15.8761,88.6982,114,114,30000); // Freeway 7 AddStaticVehicleEx(463,694.9393,-473.1948,15.8766,94.6246,114,114,30000); // Freeway 8 AddStaticVehicleEx(463,708.5647,-467.8399,15.8754,271.5996,114,114,30000); // Freeway 9 AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // Freeway 10 factionCar1 = AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // New LA Vice car we are adding, yay! } Код:
public IsAGangCar5(carid) { if((carid >= 17 && carid <= 18) || (carid == 44) || (carid == 134) || (carid == 1359) || (carid == factionCar1) ) // we edited this line { return 1; } return 0; } |
Originally Posted by ledzep
After a quick look through the script, it looks very much like your run of the mill GF edit, so adding faction cars will not be very simple for a beginner.
Since I guess you do not want to count hundreds of lines of messy code, we will create a variable to store the new vehicle's vehicleid. What you have to do is store the vehicleid of the new faction car you want to add in some variable like so: Код:
OnGameModeInit(){ ... AddStaticVehicleEx(463,694.8008,-470.2188,15.8761,88.6982,114,114,30000); // Freeway 7 AddStaticVehicleEx(463,694.9393,-473.1948,15.8766,94.6246,114,114,30000); // Freeway 8 AddStaticVehicleEx(463,708.5647,-467.8399,15.8754,271.5996,114,114,30000); // Freeway 9 AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // Freeway 10 factionCar1 = AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // New LA Vice car we are adding, yay! } Код:
public IsAGangCar5(carid) { if((carid >= 17 && carid <= 18) || (carid == 44) || (carid == 134) || (carid == 1359) || (carid == factionCar1) ) // we edited this line { return 1; } return 0; } |
C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463) : error 029: invalid expression, assumed zero C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463) : error 017: undefined symbol "factionCar1" C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463 -- 5465) : error 001: expected token: "}", but found "return" C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463 -- 5465) : fatal error 107: too many error messages on one line
public IsAGangCar2(carid) { if(carid >= 97 && carid <= 99) || (carid == factionCar1) { return 1; } return 0; }
factionCar1 = AddStaticVehicleEx(451,1246.77,-803.84.14,15.8735,268.4506,114,114,30000); // turismo
C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463) : error 029: invalid expression, assumed zero C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463) : error 017: undefined symbol "factionCar1" C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463 -- 5465) : error 001: expected token: "}", but found "return" C:\Documents and Settings\Martin\Skrivebord\gta server ftw\ser 0.3\gamemodes\larp.pwn(5463 -- 5465) : fatal error 107: too many error messages on one line
public IsAGangCar2(carid) { if(carid >= 97 && carid <= 99) || (carid == factionCar1) { return 1; } return 0; }
factionCar1 = AddStaticVehicleEx(451,1246.77,-803.84.14,15.8735,268.4506,114,114,30000); // turismo
new factionCar1;
public IsAGangCar2(carid) { if((carid >= 97 && carid <= 99) || (carid == factionCar1)) { return 1; } return 0; }