new restrictedvehicle; public OnGameModeInit() { restrictedvehicle = CreateVehicle(520,-1438.48168945,-932.98889160,202.38511658,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1452.54101562,-926.71038818,202.62852478,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1461.35107422,-917.00463867,203.01586914,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1445.40063477,-916.93469238,203.06689453,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1433.76928711,-922.97772217,202.83015442,270.00000000,-1,-1,120); //Hydra return 1; } public OnPlayerStateChange(playerid,newstate,oldstate) { if(newstate == PLAYER_STATE_DRIVER) { if(GetPlayerTeam(playerid) != CLASS_MERC && GetPlayerVehicleID(playerid) == restrictedvehicle) { SendClientMessage(playerid,RED,"[ATT]:Type /airstrike Airbourne For Airstrikes At Your Demand!(Cost 1000 Fuel!"); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,RED,"[ATT]:You Are Not Aloud To Drive This Vehicle!(Merc's Only)"); } } return 1; }
SendClientMessage(playerid,RED,"[ATT]:You Are Not Aloud To Drive This Vehicle!(Merc's Only)");
C:\Users\Weponz\Desktop\Server Files\gamemodes\M-SAIF.pwn(219) : error 028: invalid subscript (not an array or too many subscripts): "restrictedvehicle" C:\Users\Weponz\Desktop\Server Files\gamemodes\M-SAIF.pwn(219) : warning 215: expression has no effect C:\Users\Weponz\Desktop\Server Files\gamemodes\M-SAIF.pwn(219) : error 001: expected token: ";", but found "]" C:\Users\Weponz\Desktop\Server Files\gamemodes\M-SAIF.pwn(219) : error 029: invalid expression, assumed zero C:\Users\Weponz\Desktop\Server Files\gamemodes\M-SAIF.pwn(219) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
new sapd[8];
sapd[0] = AddStaticVehicle(598,2256.2041,2476.9424,10.5694,356.1667,0,1); // policecar
sapd[1] = AddStaticVehicle(598,2256.2522,2442.7004,10.5722,358.7384,0,1); // policecar
sapd[2] = AddStaticVehicle(598,2269.4016,2476.6553,10.5733,358.4040,0,1); // policecar2
sapd[3] = AddStaticVehicle(596,2269.4478,2441.5247,10.6808,176.6156,0,1); // policecar4
sapd[4] = AddStaticVehicle(427,2277.5825,2477.3967,10.9522,0.1354,1,2); // spadenforcer
sapd[5] = AddStaticVehicle(528,2278.3333,2441.9409,10.8645,179.2752,0,0); // fbitrucksapd
sapd[6] = AddStaticVehicle(601,2291.1401,2443.5559,10.5791,1.0332,1,1); // swatsapd
sapd[7] = AddStaticVehicle(490,2510.3882,2389.3213,10.9475,271.2535,0,0);
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new playerState = GetPlayerState(playerid);
new vid = GetPlayerVehicleID(playerid);
if (playerState == PLAYER_STATE_DRIVER)
{
for(new i = 0; i < sizeof(sapd); i++)
if(OrgId[playerid] != 1 || vid == sapd[i] || vid == sapd[i] || vid == sapd[i] || vid == sapd[i] || vid == sapd[i] || vid == sapd[i] || vid == sapd[i] || vid == sapd[i])
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,red,"This is an organization Vehicle");
}
return 1;
}
pawn Код:
pawn Код:
|