A huge problem
#1

So,i have a problem at some cars...When i enter into a public vehicle (If is a job,or is a faction) and i don't have the keys for that car,in my chatbox will appear "You don't have the keys for this vehicle",for 100 times...
For an example:
Код:
		if(IsAHarvest(newcar))
		{
			if(PlayerInfo[playerid][pJob] == 18)
			{
			    if(FarmerVar[playerid] == 0)
			    {
			    	SendClientMessage(playerid, COLOR_RED, "___________Farmer guide___________");
			    	SendClientMessage(playerid, COLOR_WHITE, "** Farmer ** /startharvest, /stopharvest or /exit");
			    	SendClientMessage(playerid, COLOR_RED, "__________________________________");
			    	TogglePlayerControllable(playerid, 0);
				}
				else { }
			}
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   You don't have keys of this vehicle !");
			    RemovePlayerFromVehicle(playerid);
			}
		}
When i enter in a harvest car,it will appear "** Farmer ** /startharvest, /stopharvest or /exit" for a lot of times...

Yeah,i know that i'm not verry good at english,but i hope that you get the point.
Can someone help me?Please
Reply
#2

Where exactly do you use this snippet?
Reply
#3

What do you want to say by snippet?Where is the code in the GM?
Reply
#4

Anyone can help me?
Reply
#5

pawn Код:
if(IsAHarvest(newcar))
        {
            if(PlayerInfo[playerid][pJob] == 18)
            {
                if(FarmerVar[playerid] == 0)
                {
                    SendClientMessage(playerid, COLOR_RED, "___________Farmer guide___________");
                    SendClientMessage(playerid, COLOR_WHITE, "** Farmer ** /startharvest, /stopharvest or /exit");
                    SendClientMessage(playerid, COLOR_RED, "__________________________________");
                    TogglePlayerControllable(playerid, 0);
                }
                else
                {
                     SendClientMessage(playerid, COLOR_GREY, "   You don't have keys of this vehicle !");
                     RemovePlayerFromVehicle(playerid);
                }
         }

Try that maybe, If it doesn't work then post the whole command and anything involved with it. I or someone may be able to help you then.
Reply
#6

Quote:
Originally Posted by Yookku
Посмотреть сообщение
What do you want to say by snippet?Where is the code in the GM?
Again, where exactly do you use this snippet/piece of code?
Reply
#7

So some car ids ain't set correctly.
Reply
#8

Quote:
Originally Posted by Keyhead
Посмотреть сообщение
pawn Код:
if(IsAHarvest(newcar))
        {
            if(PlayerInfo[playerid][pJob] == 18)
            {
                if(FarmerVar[playerid] == 0)
                {
                    SendClientMessage(playerid, COLOR_RED, "___________Farmer guide___________");
                    SendClientMessage(playerid, COLOR_WHITE, "** Farmer ** /startharvest, /stopharvest or /exit");
                    SendClientMessage(playerid, COLOR_RED, "__________________________________");
                    TogglePlayerControllable(playerid, 0);
                }
                else
                {
                     SendClientMessage(playerid, COLOR_GREY, "   You don't have keys of this vehicle !");
                     RemovePlayerFromVehicle(playerid);
                }
         }

Try that maybe, If it doesn't work then post the whole command and anything involved with it. I or someone may be able to help you then.
Well,it's not actualy a command.When you enter in the car it will appear that SCM for multiple times

And that code is after
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
All my faction and job cars are after this line
For an example,another code with cars
pawn Код:
if(newcar == med1 || newcar == med2 || newcar == med3 || newcar == med4 || newcar == med5)
        {
            if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { }
            else
            {
               
                SendClientMessage(playerid,COLOR_PINK,"   You don't have the keys of this car !");
                RemovePlayerFromVehicle(playerid);
            }
        }
Reply
#9

This is just some Ravens Roleplay non-sense code the "huge problem" is actually the script your using.
Reply
#10

well,it's not actualy Ravens Roleplay,is La-Rp Edit and i can't fix that...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)