SA-MP Forums Archive
Public is not fulfilled if the code in the FS - 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: Public is not fulfilled if the code in the FS (/showthread.php?tid=82958)



Public is not fulfilled if the code in the FS - heufix - 21.06.2009

I created code:
http://pastebin.com/m30af9774
pawn Код:
#include <a_samp>
#include <core>
#include <float>
 
new box;
 
new InBox[MAX_PLAYERS];
 
new Score[MAX_PLAYERS];
 
 
public OnGameModeInit()
{
    CreateObject(7416, 2067.0131, 1062.9815, 652.9669, 0.0, 0.0, 0.0);
    return 0;
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/dayn", true))
    {
        if(InBox[playerid]==1) return SendClientMessage(playerid,0xFFFFFFFF,"XYI TEBE LOH");
        if(!box || box == 1)
        {
            if(1 != InBox[playerid])
            {
                SetPlayerPos(playerid, 2046.6719, 1042.306, 654.434);
                SetPlayerFacingAngle(playerid, 8.1282);
                ResetPlayerWeapons(playerid);
                //-------------------------------------------
                new Skine[2] = { 80, 81 };
                SetPlayerSkin(playerid, Skine[random(2)]);
                //---------------------------------------------
                box++;
                InBox[playerid] = 1;
                ///--------------------------------------------
                new string[128], playername[MAX_PLAYER_NAME];
                GetPlayerName(playerid, playername, 24);
                format(string, 256, "Player %s teleported to the ring", playername);
                SendClientMessageToAll(0x33AA33AA, string);
            }
        }
        return 1;
    }
    return 0;
}
 
public OnPlayerDeath(playerid, killerid, reason)
{
    if(InBox[killerid] == 1 && InBox[playerid] == 1)
    {
        if(2 != Score[killerid])
        {
            Score[killerid]++;
            new player[MAX_PLAYER_NAME], vrag[MAX_PLAYER_NAME], string[128];
            GetPlayerName(killerid, player, 256);
            GetPlayerName(playerid, vrag, 256);
            format(string, 256, "%s vedet co c4etom: %d :%d na 'o' protiv: %s!!!", player, Score, Score, vrag);
            SendClientMessageToAll(0x33AA33AA, string);
            SetPlayerHealth(killerid, 100.0);
        }
        else if(Score[killerid] == 2)
        {
            Score[killerid]++;
           
            new winer[MAX_PLAYER_NAME], proigr[MAX_PLAYER_NAME], string[128];
            GetPlayerName(killerid, winer, 256);
            GetPlayerName(playerid, proigr, 256);
            format(string, 256, "%s Win %s , Score: %d :%d !", winer, proigr, Score, Score);
            SendClientMessageToAll(0x33AA33AA, string);
           
            SpawnPlayer(killerid);
           
            box = 0;
           
            for(new pita4ok = 0; pita4ok < 256; pita4ok++)
            {
                InBox[pita4ok] = 0;
            }
            for(new pita4ok = 0; pita4ok < 256; pita4ok++)
            {
                Score[pita4ok] = 0;
            }
        }
    }
    return 1;
}
 
public OnPlayerSpawn(playerid)
{
    if(3 != Score[playerid] && InBox[playerid] == 1)
    {
        new Skine[2] = { 80, 81 };
        SetPlayerSkin(playerid, Skine[random(2)]);
        ResetPlayerWeapons(playerid);
        SetPlayerPos(playerid, 2046.6719, 1042.306, 654.434);
    }
    return 1;
}
If the code in the GameMode - works fine.
If I use this code as the FS - is not working. (Public Functions "OnPlayerDeath" Not implemented)

What should I do?
Tell me please...



Re: Public is not fulfilled if the code in the FS - heufix - 22.06.2009

Really nobody knows what problem this code?


Re: Public is not fulfilled if the code in the FS - heufix - 22.06.2009

up.....


Re: Public is not fulfilled if the code in the FS - heufix - 22.06.2009

up


Re: Public is not fulfilled if the code in the FS - woot - 22.06.2009

pawn Код:
#define FILTERSCRIPT
.. if that's not your question, try asking again, can't really understand your question.


Re: Public is not fulfilled if the code in the FS - heufix - 22.06.2009

Quote:
Originally Posted by //exora
pawn Код:
#define FILTERSCRIPT
.. if that's not your question, try asking again, can't really understand your question.
No, I do not mean it.
mm ..
i need to be this boxing, 3 rounds. (3 times the spawn in the right location)
Understand a my question, or did not?


Re: Public is not fulfilled if the code in the FS - heufix - 23.06.2009

gbI


Re: Public is not fulfilled if the code in the FS - Grim_ - 23.06.2009

Explain your problem more.


Re: Public is not fulfilled if the code in the FS - heufix - 23.06.2009

Quote:
Originally Posted by Swift_
Explain your problem more.
bla!
I need to make a script like in this boxing (three round)
I made my code, but it does not work.
Understand ?