03.03.2009, 16:28
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;
then here it is with more than just that one;
NOTE; GVM is for GetVehicleModel and GPS is for GetPlayerSkin
I then get these erros/warnings;
all of which feature on the lines i've submitted.
Any help pls?
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;
}
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;
}
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"
Any help pls?