SA-MP Forums Archive
I need some help with A car System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need some help with A car System (/showthread.php?tid=342918)



I need some help with A car System - miley1 - 15.05.2012

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


Re: I need some help with A car System - TheDominator - 15.05.2012

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;
}



Re: I need some help with A car System - miley1 - 15.05.2012

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


Re: I need some help with A car System - TheDominator - 15.05.2012

Well first list your errors here.


Re: I need some help with A car System - miley1 - 15.05.2012

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?


Re: I need some help with A car System - TheDominator - 15.05.2012

Link: http://pastebin.com/Eyy5WKLV


Re: I need some help with A car System - miley1 - 15.05.2012

Thanks bro U great ill try it


Re: I need some help with A car System - miley1 - 15.05.2012

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.



AW: I need some help with A car System - Edin Black - 15.05.2012

no in pawno.

put this in your gamemod. -.-


Re: I need some help with A car System - miley1 - 15.05.2012

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