[g_iGroupType] == 2
{ RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, slx, sly, slz+1.3); defer NOPCheck(playerid); format(string, sizeof(string), "You need to be in %s to drive this vehicle.", arrGroupData[DynVehicleInfo[DynVeh[vehicleid]][gv_igID]][g_szGroupName]); SendClientMessageEx(playerid, COLOR_GRAD2, string); }
else if(DynVeh[vehicleid] != -1) { new string[128], Float:slx, Float:sly, Float:slz; GetPlayerPos(playerid, slx, sly, slz); if(DynVehicleInfo[DynVeh[vehicleid]][gv_igID] != INVALID_GROUP_ID && (PlayerInfo[playerid][pMember] != DynVehicleInfo[DynVeh[vehicleid]][gv_igID])) { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, slx, sly, slz+1.3); defer NOPCheck(playerid); format(string, sizeof(string), "You need to be in %s to drive this vehicle.", arrGroupData[DynVehicleInfo[DynVeh[vehicleid]][gv_igID]][g_szGroupName]); SendClientMessageEx(playerid, COLOR_GRAD2, string); }
{
RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, slx, sly, slz+1.3); defer NOPCheck(playerid); // format(string, sizeof(string), "You need to be in %s to drive this vehicle.", arrGroupData[DynVehicleInfo[DynVeh[vehicleid]][gv_igID]][g_szGroupName]); // SendClientMessageEx(playerid, COLOR_GRAD2, string); } Like this? or just: { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, slx, sly, slz+1.3); defer NOPCheck(playerid); } |
[g_iGroupType] == 2
else if(DynVeh[vehicleid] != -1) { new Float:slx, Float:sly, Float:slz; GetPlayerPos(playerid, slx, sly, slz); if(DynVehicleInfo[DynVeh[vehicleid]][gv_igID] != INVALID_GROUP_ID && (PlayerInfo[playerid][pMember] != DynVehicleInfo[DynVeh[vehicleid]][gv_igID])) { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, slx, sly, slz+1.3); defer NOPCheck(playerid); }
else if(DynVeh[vehicleid] != -1) { new string[128], Float:slx, Float:sly, Float:slz; GetPlayerPos(playerid, slx, sly, slz); if(DynVehicleInfo[DynVeh[vehicleid]][gv_igID] != INVALID_GROUP_ID && (PlayerInfo[playerid][pMember] != DynVehicleInfo[DynVeh[vehicleid]][gv_igID])) { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, slx, sly, slz+1.3); defer NOPCheck(playerid); if(arrGroupData[g_iGroupType] != 2) { format(string, sizeof(string), "You need to be in %s to drive this vehicle.", arrGroupData[DynVehicleInfo[DynVeh[vehicleid]][gv_igID]][g_szGroupName]); SendClientMessageEx(playerid,COLOR_GRAD2, string); } }
Код:
else if(DynVeh[vehicleid] != -1) { new string[128], Float:slx, Float:sly, Float:slz; GetPlayerPos(playerid, slx, sly, slz); if(DynVehicleInfo[DynVeh[vehicleid]][gv_igID] != INVALID_GROUP_ID && (PlayerInfo[playerid][pMember] != DynVehicleInfo[DynVeh[vehicleid]][gv_igID])) { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid, slx, sly, slz+1.3); defer NOPCheck(playerid); if(arrGroupData[g_iGroupType] != 2) { format(string, sizeof(string), "You need to be in %s to drive this vehicle.", arrGroupData[DynVehicleInfo[DynVeh[vehicleid]][gv_igID]][g_szGroupName]); SendClientMessageEx(playerid,COLOR_GRAD2, string); } } |
./includes/callbacks.pwn(5931) : warning 217: loose indentation ./includes/callbacks.pwn(5931) : error 033: array must be indexed (variable "arrGroupData") ./includes/callbacks.pwn(5934) : warning 217: loose indentation ./includes/callbacks.pwn(5937) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.