SA-MP Forums Archive
Hmm My brain failing me help.. - 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: Hmm My brain failing me help.. (/showthread.php?tid=286489)



Hmm My brain failing me help.. - Buzzbomb - 29.09.2011

I added if(PlayerInfo[playerid][pJob] >= 1) Dont remove me from vehicle but if i remove it bam Im removed cause Im not FiremanVehicle What im trying to do is if someone walks up trys to take the firetruck it wont let them unless there on fire man duty as if(PlayerInfo[playerid][pJob] >= 1) But Im tired and i cant think straight.. Anyone please help.. thanks
Код:
  new PlayerName[24];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new Vehicle = GetPlayerVehicleID(playerid);
        if(Vehicle == FiremanVehicle)
        {
		    if(PlayerInfo[playerid][pJob] >= 1)
            {
                if(strcmp(PlayerName,"FiremanVehicle",true))
                {
                     SendClientMessage(playerid, 0x33AA33AA, "You Are Not On Fire Duty");
                     RemovePlayerFromVehicle(playerid);
				}
            }
        }
    }



Re: Hmm My brain failing me help.. - Buzzbomb - 29.09.2011

Edit Sorry I got it LOL Dur..................
Код:
    new PlayerName[24];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new Vehicle = GetPlayerVehicleID(playerid);
        if(Vehicle == FiremanVehicle == PlayerInfo[playerid][pJob] >= 1)
        {
            if(strcmp(PlayerName,"FiremanVehicle",true))
            {
                SendClientMessage(playerid, 0x33AA33AA, "You Are Not On Fire Duty");
                RemovePlayerFromVehicle(playerid);
            }
        }
    }