[Help]Console error
#2

pawn Код:
#include <a_samp>
#include <a_players>

forward CheckKillstreak(killerid);

public OnGameModeInit()
{
    SetGameModeText("COD");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPVarInt(playerid, "killstreak", 0);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == INVALID_PLAYER_ID)
        {
        SetPVarInt(playerid, "killstreak", 0);
        }
        else
        {
        SetPVarInt(killerid ,"killstreak", GetPVarInt(killerid, "var") + 1); //var should be  killstreak, there is the error
        CheckKillstreak(killerid);
        }
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public CheckKillstreak(killerid)
{
    if(GetPVarInt(killerid, "killstreak") == 3)
    {
            SendClientMessage(killerid, 0x00ff0000,"You can now use Emergency Airdrop, press 8 on your keypad");
            SetPVarInt(killerid, "EAdrop", 1);
    }
    return 1;
}
Reply


Messages In This Thread
[Help]Console error - by sansko - 16.11.2010, 18:23
Re: [Help]Console error - by The_Moddler - 16.11.2010, 18:26
Re: [Help]Console error - by sansko - 16.11.2010, 18:29
Re: [Help]Console error - by JaTochNietDan - 16.11.2010, 18:32
Re: [Help]Console error - by sansko - 16.11.2010, 18:36

Forum Jump:


Users browsing this thread: 2 Guest(s)