31.01.2018, 09:17
Код:
if(!strcmp(cmd, "/engine", true)) { if(IsPlayerInAnyVehicle(playerid)) { if(IsPlayerConnected(playerid)) { if(!engineOn[GetPlayerVehicleID(playerid)]) { new idcar = GetPlayerVehicleID(playerid); if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1; if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1; if(IsARentableVeh(idcar)) { if(HireCar[playerid] != idcar) return 1; } if(IsAHarvest(idcar)) return 1; if(IsADrugHarvest(idcar)) return 1; if(IsASweeper(idcar)) return 1; if(IsASalesVehicle(idcar)) return 1; if(CanTurnEngine[playerid] != idcar && CanTurnEngine[playerid] == 9999) return SendClientMessage(playerid, COLOR_GREY,"* You cannot turn this car's engine!"); new plname[MAX_PLAYER_NAME]; GetPlayerName(playerid, plname, sizeof(plname)); format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine.", plname); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); if(PlayerInfo[playerid][pAdmin] < 1337 && PlayerInfo[playerid][pAdminDuty] == 1) { SetTimerEx("StartingTheVehicle",1,0,"i",playerid); } else
Код:
C:\Documents and Settings\Administrator\My Documents\Downloads\GGWRPV4.2\gamemodes\GGWRP.pwn(28058) : warning 219: local variable "idcar" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Код:
new idcar = GetPlayerVehicleID(playerid); if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1; if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1; if(IsARentableVeh(idcar)) { if(HireCar[playerid] != idcar) return 1; }