More than code under OnPlayerEnterVehicle.
#1

Hey,

I have a problem, when i try to add more than one code under OnPlayerEnterVehicle it does not work, one compiles fine tho

here is my code;

pawn Код:
if (GVM(vehicleid) == 534 || GVM(vehicleid) == 566 || GVM(vehicleid) == 535 || GVM(vehicleid) == 567 || GVM(vehicleid) == 412 && GPS(playerid) == 114 || GPS(playerid) == 115 || GPS(playerid) == 116 || GPS(playerid) == 173 || GPS(playerid) == 174 || GPS(playerid) == 175 || GPS(playerid) == 48)
    {
    SendClientMessage(playerid,0xFFFFFFAA,"Welcome to your faction's vehicle!");
    }
    else
    {
                new Float:X, Float:Y, Float:Z;
                GetPlayerPos(playerid, X, Y, Z);
                SetPlayerPos(playerid, X, Y, Z);
                SendClientMessage(playerid,0x63AFF00A,"You don't have the keys for this vehicle!");
                }
                return 1;
        }
then here it is with more than just that one;

pawn Код:
if (GVM(vehicleid) == 534 || GVM(vehicleid) == 566 || GVM(vehicleid) == 535 || GVM(vehicleid) == 567 || GVM(vehicleid) == 412 && GPS(playerid) == 114 || GPS(playerid) == 115 || GPS(playerid) == 116 || GPS(playerid) == 173 || GPS(playerid) == 174 || GPS(playerid) == 175 || GPS(playerid) == 48)
    {
    SendClientMessage(playerid,0xFFFFFFAA,"Welcome to your faction's vehicle!");
    }
    else
    {
                new Float:X, Float:Y, Float:Z;
                GetPlayerPos(playerid, X, Y, Z);
                SetPlayerPos(playerid, X, Y, Z);
                SendClientMessage(playerid,0x63AFF00A,"You don't have the keys for this vehicle!");
                }
                return 1;
        }

    else if (GVM(vehicle) == 567 && GPS(playerid) == 109)
    {
        SendClientMessage(playerid,0xFFFFFFAA,"Welcome to your faction's vehicle!");
    }
    else
    {
                new Float:X, Float:Y, Float:Z;
                GetPlayerPos(playerid, X, Y, Z);
                SetPlayerPos(playerid, X, Y, Z);
                SendClientMessage(playerid,0x63AFF00A,"You don't have the keys for this vehicle!");
                }
                return 1;
        }
NOTE; GVM is for GetVehicleModel and GPS is for GetPlayerSkin

I then get these erros/warnings;

Код:
 : warning 219: local variable "X" shadows a variable at a preceding level
 : warning 219: local variable "Y" shadows a variable at a preceding level
 : warning 219: local variable "Z" shadows a variable at a preceding level
 : warning 219: local variable "X" shadows a variable at a preceding level
 : warning 219: local variable "Y" shadows a variable at a preceding level
 : warning 219: local variable "Z" shadows a variable at a preceding level
 : error 010: invalid function or declaration
 : error 010: invalid function or declaration
 : error 021: symbol already defined: "GetPlayerPos"
 : error 010: invalid function or declaration
: warning 203: symbol is never used: "X"
: warning 203: symbol is never used: "Y"
 : warning 203: symbol is never used: "Z"
all of which feature on the lines i've submitted.

Any help pls?
Reply


Messages In This Thread
More than code under OnPlayerEnterVehicle. - by Cevarr - 03.03.2009, 16:28
Re: More than code under OnPlayerEnterVehicle. - by Rks25 - 03.03.2009, 16:39
Re: More than code under OnPlayerEnterVehicle. - by Cevarr - 03.03.2009, 16:42
Re: More than code under OnPlayerEnterVehicle. - by Rks25 - 03.03.2009, 16:49
Re: More than code under OnPlayerEnterVehicle. - by Cevarr - 03.03.2009, 16:59
Re: More than code under OnPlayerEnterVehicle. - by Rks25 - 03.03.2009, 17:01
Re: More than code under OnPlayerEnterVehicle. - by Cevarr - 03.03.2009, 17:04
Re: More than code under OnPlayerEnterVehicle. - by Rks25 - 03.03.2009, 17:09
Re: More than code under OnPlayerEnterVehicle. - by Cevarr - 03.03.2009, 17:10
Re: More than code under OnPlayerEnterVehicle. - by Finn - 03.03.2009, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)