Reversing horn
#4

Hello someone gave me this code:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
    {
        SetPVarInt(playerid, "ReverseHorn", 1);
        ReverseHorn(GetPlayerVehicleID(playerid), 1);
    }
    if((oldkeys & KEY_JUMP) && !(newkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
    {
        if(GetPVarInt(playerid, "ReverseHorn") == 0) return 1;
        SetPVarInt(playerid, "ReverseHorn", 0);
        ReverseHorn(GetPlayerVehicleID(playerid), 0);
    }
    return 1;
}

ReverseHorn(vehicleid, bool:status)
{
    switch(status)
    {
        case 0:
        {
            SetVehicleParamsEx(vehicleid, -1, -1, 0, -1, -1, -1, -1); //engine, lights, alarm, doors, bonnet, boot, objective
        }
        case 1:
        {
            SetVehicleParamsEx(vehicleid, -1, -1, 1, -1, -1, -1, -1); //engine, lights, alarm, doors, bonnet, boot, objective
        }
    }
}
BUt i get these warnings:
Код:
C:\Users\Thimo\Desktop\Programmas\Mappen\Samp 2\gamemodes\PPC_Trucking.pwn(1223) : warning 213: tag mismatch
C:\Users\Thimo\Desktop\Programmas\Mappen\Samp 2\gamemodes\PPC_Trucking.pwn(1229) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
These lines are this:
pawn Код:
if((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
    {
        SetPVarInt(playerid, "ReverseHorn", 1);
        ReverseHorn(GetPlayerVehicleID(playerid), 1); //this is the warning message
    }
    if((oldkeys & KEY_JUMP) && !(newkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
    {
        if(GetPVarInt(playerid, "ReverseHorn") == 0) return 1;
        SetPVarInt(playerid, "ReverseHorn", 0);
        ReverseHorn(GetPlayerVehicleID(playerid), 0); //this is the warning message too
    }
Could anyone please help? thank you
Its working but it gives warnings! :S
Reply


Messages In This Thread
Reversing horn - by thimo - 02.03.2011, 17:08
Re: Reversing horn - by thimo - 05.03.2011, 10:09
Re: Reversing horn - by thimo - 07.03.2011, 12:21
Re: Reversing horn - by thimo - 11.04.2011, 06:33
Respuesta: Reversing horn - by usrb1n - 11.04.2011, 07:07
Re: Reversing horn - by thimo - 11.04.2011, 07:16
Re: Reversing horn - by Retardedwolf - 11.04.2011, 07:37
Re: Reversing horn - by thimo - 11.04.2011, 07:43

Forum Jump:


Users browsing this thread: 2 Guest(s)