SA-MP Forums Archive
Meh, I don't get it.. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Meh, I don't get it.. (/showthread.php?tid=69902)



Meh, I don't get it.. - Exquiza - 21.03.2009

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


Re: Meh, I don't get it.. - Exquiza - 21.03.2009

*Bumpp


Re: Meh, I don't get it.. - Outbreak - 21.03.2009

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


Re: Meh, I don't get it.. - Exquiza - 21.03.2009

O hi outbreak
ty