15.05.2012, 15:42
I wish That i can open My Trunk and my hood with /bonnet and /boot i tried to create it but i dont know how anyone couldt do it for me? Thanks for reading u get rep if u do it
new engine,lights,alarm,doors,bonnet,boot,objective;
public OnPlayerCommandText(playerid, cmdtext[]) {
if(strcmp("/hood", cmdtext, true, 10) == 0) {
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(vid != INVALID_VEHICLE_ID) {
if(bonnet == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_OFF, boot, objective);
else if(bonnet == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, VEHICLE_PARAMS_ON, boot, objective);
}
return 1;
}
if(strcmp("/trunk", cmdtext, true, 10) == 0) {
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(vid != INVALID_VEHICLE_ID) {
if(boot == VEHICLE_PARAMS_ON) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_OFF, objective);
else if(boot == VEHICLE_PARAMS_OFF) SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, VEHICLE_PARAMS_ON, objective);
}
return 1;
}
return 0;
}
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(27237) : error 029: invalid expression, assumed zero
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(27237) : error 029: invalid expression, assumed zero
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(27241) : error 017: undefined symbol "vid"
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(27250) : error 017: undefined symbol "vid"
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(27259) : warning 225: unreachable code
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28750) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28750) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28750) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28750) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28750) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28750) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28750) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28783) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28783) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28783) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28783) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28783) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28783) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(28783) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(78779) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(78779) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(78779) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(78779) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(78779) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(78779) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\Snor!\Desktop\Real Life ENG\gamemodes\audi.pwn(78779) : warning 219: local variable "objective" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.