24.07.2009, 10:34
Hello.
I'm using this code:
Then this in OnGameModeInIt()
And How can i use CopCars in if?
For example, if player try to use the vehicle, and his pInfo[playerid][Job] is not 1, he gets removed from the vehicle. I'm trying to use this:
But i Get:
Line 206:
What's wrong? :/
I'm using this code:
Код:
enum CARS_DATA { MODELID, Float:X, Float:Y, Float:Z, Float:A, C1, C2 }; new CopCars[][CARS_DATA] = { {523,-215.9483,984.5226,18.9468,271.7301,0,0}, {523,-215.9859,987.1728,19.0048,270.5827,0,0}, {598,-228.1274,991.1447,19.2631,269.0867,0,1}, {599,-228.6810,996.4469,19.7480,268.6263,0,1}, {598,-214.6644,973.0877,19.0327,271.4312,0,1} };
Код:
for(new a=0; a< sizeof CopCars; a++) { CreateVehicle ( CopCars[a][MODELID], CopCars[a][X], CopCars[a][Y], CopCars[a][Z], CopCars[a][A], CopCars[a][C1], CopCars[a][C2], 1000 ); }
For example, if player try to use the vehicle, and his pInfo[playerid][Job] is not 1, he gets removed from the vehicle. I'm trying to use this:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { new CarID = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER) { if(CarID == CopCars) { if(pInfo[playerid][Darbas] == 1) { } else { RemovePlayerFromVehicle(playerid); } } } return 1; }
Код:
C:\Documents and Settings\Simas\Desktop\RL\gamemodes\RL0.1.pwn(206) : error 033: array must be indexed (variable "CopCars")
Код:
if(CarID == CopCars) {