A few bugs
#1

So I'm working around with a gamemode, and it seems like I've discovered a few bugs which I can't seem to get fixed.

First of all, then I wanted to make sure that you could lock your cars, so I downloaded "Cali-Cars (filterscript)" but apperently the /lock only locks the car for the owner. Anyone else can enter it, and drive it.

On the other hand, then I can't get my /nos command to work for only mechanics.

Код:
 if(strcmp(cmdtext, "/nos", true) == 0)
    {
        if(PlayerInfo[playerid][pJob] != 7)
        {
            new vehicleid = GetPlayerVehicleID(playerid);
    		AddVehicleComponent(vehicleid, 1010);
            SendClientMessage(playerid,0xFFFFFFFF," You added NOS to the vehicle");
            format(string, sizeof(string), "* %s added nitrous injection to the car.", sendername);
        	ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
        	return 1;
        }
        else
        {
            SendClientMessage(playerid, 0xFFFFFFF, " You're not a car mechanic!");
        }
    }
Reply
#2

Код:
 if(strcmp(cmdtext, "/nos", true) == 0)

        {
            new vehicleid = GetPlayerVehicleID(playerid);
    		AddVehicleComponent(vehicleid, 1010);
            SendClientMessage(playerid,0xFFFFFFFF," You added NOS to the vehicle");
            format(string, sizeof(string), "* %s added nitrous injection to the car.", sendername);
        	ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
        	return 1;
        }
    }
[/QUOTE]

And for the doors make your own use this code here...

https://sampwiki.blast.hk/wiki/GetVehicleParamsEx
Reply
#3

I'm not sure how GetVehicleParamsEx are going to help me.
Reply
#4

Also, how is the code you changed suppose to work for only mechanics, when you don't in any way makes the code tell if he got job 7/mechanic?
Reply
#5

Learn ti read up on it then try the code and try again if not then tell me else place this on a Script Request Thread.

Also your code did already check I assumed you wanted it for all
Reply
#6

I don't request code, I attached my own in order for people to look at it, and tell me what was wrong. Because anyone can /nos even though I defined it should only be mechanics.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)