SA-MP Forums Archive
Multiple values - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Multiple values (/showthread.php?tid=465338)



Multiple values - Alxspiker - 21.09.2013

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.");
}




Re: Multiple values - Dragony92 - 21.09.2013

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.");
}



Re: Multiple values - Alxspiker - 21.09.2013

Thank you.