Multiple values
#1

Hello, im new to SA-MP scripting and I decided to start learning by editing game modes and seeing what they do.

Im trying to get the following script to allow multiple factions in the cars.

Quote:

else if(IsNGVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 7)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the NG.");
}

So like this.

Quote:

else if(IsNGVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 7 && 8 && 3 && 4)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the NG.");
}

Reply
#2

pawn Код:
else if(IsNGVehicle(vehicleid) && PlayerInfo[playerid][pFac] != 7 && PlayerInfo[playerid][pFac] != 8 && PlayerInfo[playerid][pFac] != 3 && PlayerInfo[playerid][pFac] != 4)
{
    new Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the NG.");
}
Reply
#3

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)