[ajuda] ajuda Yo
#3

pawn Code:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER)
    {
        new jm = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(jm) == 437) {
            SetPlayerPos(playerid, /*x,y,z do interior*/);
            SetPlayerFacingAngle(playerid, 181.1296);
            SetPVarInt(playerid, "vID", GetPlayerVehicleID(playerid));
            return 0x01;
        }
        return 0x01;
    }
    return 0x01;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
        if(GetPVarInt(playerid, "vID") > 0) {
            new Float:Pos[3];
            GetVehiclePos(GetPVarInt(playerid, "vID"), Pos[0], Pos[1], Pos[2]);
            SetPlayerPos(playerid, Pos[0]+4, Pos[1], Pos[2]);
            DeletePVar(playerid, "vID");
            return 0x01;
        }
    }
    return 1;
}
Reply


Messages In This Thread
[ajuda] ajuda Yo - by Andrew_Guiga - 15.06.2011, 03:35
Re: [ajuda] ajuda Yo - by Shadoww5 - 15.06.2011, 15:17
Re: [ajuda] ajuda Yo - by Ricop522 - 15.06.2011, 15:58
Re: [ajuda] ajuda Yo - by Shadoww5 - 15.06.2011, 16:22
Re: [ajuda] ajuda Yo - by Andrew_Guiga - 15.06.2011, 22:17

Forum Jump:


Users browsing this thread: 1 Guest(s)