I need some help with A car System
#1

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
Reply
#2

pawn Код:
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;
}
Reply
#3

i tried this and i get lot of errors maybe put it in pastebin so i can try again?
Reply
#4

Well first list your errors here.
Reply
#5

well i already deleted it and i wont rewrite it again if i copy it doesnt come in my script like it stand there so put on pastebin and ill show?
Reply
#6

Link: http://pastebin.com/Eyy5WKLV
Reply
#7

Thanks bro U great ill try it
Reply
#8

and also again i get this errors

pawn Код:
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.
Reply
#9

no in pawno.

put this in your gamemod. -.-
Reply
#10

Dude i load my pawno And Turn it into my Gamemod Duh lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)