15.02.2013, 10:05
Quote:
I entered
Код:
CMD:e(playerid, params[]) { if(GetPlayerState(playerid) != 2)return SendClientMessage(playerid, GREY, "You can't start a started car."); if(HotWired[vehicle] == 1)return SendClientMessage(playerid, GREY, "This car you hot wired you can't turn it on or off"); new vehicle = GetPlayerVehicleID(playerid); if(Engine[vehicle] == 0) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); Engine[vehicle] = 1; SetVehicleParamsEx(vehicle, 1, lights, alarm, doors, bonnet, boot, 0); } else if(Engine[vehicle] == 1) { new engine, lights, alarm, doors, bonnet, boot, objective; Engine[vehicle] = 0; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicle, 0, lights, alarm, doors, bonnet, boot, 0); } return 1; } CMD:hotwire(playerid, params[]) { if(GetPlayerState(playerid) != 2)return SendClientMessage(playerid, GREY, "You must be a driver to use this command."); new vehicle = GetPlayerVehicleID(playerid); if(Engine[vehicle] == 1) { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); Engine[vehicle] = 1; SetVehicleParamsEx(vehicle, 1, lights, alarm, doors, bonnet, boot, 0); HotWired[vehicleid] = 1; SendClientMessage(playerid, GREY, "Now you can't turn off your car?"); } return 1; } Код:
C:\Users\Jason\Desktop\205.234.152.184_7780\gamemodes\OGRP.pwn(1534) : error 017: undefined symbol "vehicle" C:\Users\Jason\Desktop\205.234.152.184_7780\gamemodes\OGRP.pwn(1562) : error 017: undefined symbol "vehicleid" C:\Users\Jason\Desktop\205.234.152.184_7780\gamemodes\OGRP.pwn(1630) : error 017: undefined symbol "i" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. Код:
if(HotWired[vehicle] == 1)return SendClientMessage(playerid, GREY, "This car you hot wired you can't turn it on or off"); Код:
HotWired[vehicleid] = 1; |
Everywhere it's written: Engine[vehicle],... but then for HotWire you suddenly use vehicleid, so change it to this:
pawn Код:
HotWire[vehicle] = 1;
pawn Код:
if(GetPlayerState(playerid) != 2)return SendClientMessage(playerid, GREY, "You can't start a started car.");
if(HotWired[vehicle] == 1)return SendClientMessage(playerid, GREY, "This car you hot wired you can't turn it on or off");
new vehicle = GetPlayerVehicleID(playerid);
pawn Код:
new vehicle = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) != 2)return SendClientMessage(playerid, GREY, "You can't start a started car.");
if(HotWired[vehicle] == 1)return SendClientMessage(playerid, GREY, "This car you hot wired you can't turn it on or off");