Meh, I don't get it..
#1

http://pastebin.com/m3263ad5d
I've got this, if the players is in the oiltanker then there's a checkpoint he needs to bring the vehicle to blababla..
But, if the player's for some reason out of the vehicle, then the checkpoint doesn't remove?
How can I fix that?
ty for answering
Reply
#2

*Bumpp
Reply
#3

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) // This function checks if the state of a player is changing.
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new numero = GetPlayerVehicleID(playerid);
        if(numero == Oiltanker)
        {
            if(gTeam[playerid] == TEAM_DEFENDERS)
            {
                SendClientMessage(playerid,0xFF0000AA, "You traitor, don't steal your own oil!");
                RemovePlayerFromVehicle(playerid);
            }
            else if(gTeam[playerid] == TEAM_ATTACKERS)
            {
                SetPlayerCheckpoint(playerid, -740.419067, -118.292442, 67.074729, 5.0);
                SendClientMessage(playerid, 0x33AA33AA, "You have stolen the oiltanker! Attach the trailer and don't lose your oil!!");

                                GameTextForAll("~g~Somebody is stealing the oiltanker!", 5000,3);
                                //SendClientMessageToAll(0xFF0000AA, "<Somebody is stealing the oil!>");
                        }
            }
        }//this closeing brace was missing, it was places further down in the wrong place.
        else if(newstate == PLAYER_STATE_ONFOOT)
        {
    DisablePlayerCheckpoint(playerid);
    SetVehicleParamsForPlayer(Oiltanker,playerid,1,0);
        }
    return 1;
    }
Should be fine now, just a closing brace in the wrong place.. GL
Reply
#4

O hi outbreak
ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)