Public is not fulfilled if the code in the FS
#1

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...
Reply
#2

Really nobody knows what problem this code?
Reply
#3

up.....
Reply
#4

up
Reply
#5

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

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?
Reply
#7

gbI
Reply
#8

Explain your problem more.
Reply
#9

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 ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)