[AJUDA]Aonde estб o erro pessoal?
#2

pawn Код:
#include <a_samp>

#define TOTAIS_CHECKS 19

new Stats[MAX_PLAYERS];
new bool:PlayerRa[500];

new Float:Checkpoints[TOTAIS_CHECKS][3] =
{
{ -302.1711,1508.3451,75.3594 },
{ -305.4507,1395.2365,72.3118 },
{ -375.1031,1461.8661,62.1423 },
{ -328.6879,1316.2310,52.4871 },
{ -447.1574,1500.4052,34.9547 },
{ -399.9567,1750.0654,42.6130 },
{ -409.4537,1918.7510,57.7848 },
{ -439.1856,1759.7423,72.0444 },
{ -480.7166,1939.3983,86.4597 },
{ -388.9103,2080.4001,61.1164 },
{ -532.2165,1990.8622,60.3906 },
{ -384.1641,2075.6667,60.9181 },
{ -439.3697,1761.9298,72.0275 },
{ -418.0215,1917.2354,57.4656 },
{ -443.9293,1630.9391,35.6589 },
{ -324.8012,1316.9939,52.8978 },
{ -370.5130,1462.3467,62.6581 },
{ -308.6009,1395.1691,72.2705 },
{ -301.6882,1501.4779,75.5935 }
};

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/corrida", true))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк foi para o Race");
        PlayerRa[playerid] = true;
        SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[Stats[playerid]][0], Checkpoints[Stats[playerid]][1], Checkpoints[Stats[playerid]][2], Checkpoints[Stats[playerid]+1][0], Checkpoints[Stats[playerid]+1][1], Checkpoints[Stats[playerid]+1][2], 10);
        Stats[playerid]++;
        return true;
    }
    return false;
}
public OnPlayerEnterCheckpoint(playerid)
{
    if(PlayerRa[playerid] == true)
    {
        Stats[playerid]++;
        DisablePlayerRaceCheckpoint(playerid);
        SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[Stats[playerid]][0], Checkpoints[Stats[playerid]][1], Checkpoints[Stats[playerid]][2], Checkpoints[Stats[playerid]+1][0], Checkpoints[Stats[playerid]+1][1], Checkpoints[Stats[playerid]+1][2], 10);
    }
    if(Stats[playerid] == TOTAIS_CHECKS-1 && PlayerRa[playerid] == true)
    {
        DisablePlayerRaceCheckpoint(playerid);
        SetPlayerRaceCheckpoint(playerid,1, Checkpoints[Stats[playerid]][0], Checkpoints[Stats[playerid]][1], Checkpoints[Stats[playerid]][2], Checkpoints[Stats[playerid]+1][0], Checkpoints[Stats[playerid]+1][1], Checkpoints[Stats[playerid]+1][2], 10);
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк esta quase acabando a corrida!!");
    }
    if(Stats[playerid] == TOTAIS_CHECKS && PlayerRa[playerid] == true)
    {
        PlayerRa[playerid] = false;
        Stats[playerid] = 0;
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк acabou o Race parabйns");
        DisablePlayerRaceCheckpoint(playerid);
    }
    return true;
}
coloca assim...
Olha ae:

https://sampforum.blast.hk/showthread.php?tid=143924
Reply


Messages In This Thread
[AJUDA]Aonde estб o erro pessoal? - by Adriano499 - 10.03.2011, 00:32
Re: [AJUDA]Aonde estб o erro pessoal? - by [Ips]Guh - 10.03.2011, 01:00
Re: [AJUDA]Aonde estб o erro pessoal? - by Adriano499 - 10.03.2011, 01:13
Re: [AJUDA]Aonde estб o erro pessoal? - by zSuYaNw - 10.03.2011, 01:28
Re: [AJUDA]Aonde estб o erro pessoal? - by Adriano499 - 10.03.2011, 01:36
Re: [AJUDA]Aonde estб o erro pessoal? - by [Ips]Guh - 10.03.2011, 13:35

Forum Jump:


Users browsing this thread: 3 Guest(s)