[erro] checkpoints do gerador da fek!
#2

Vou ver depois o que esta ocorrendo, na Beta Tests estava tudo funcional,exceto a array que vinha meio desorganizada na indentacaзгo devido ao php

pawn Код:
//- Race Creator in PHP By DraKiNs -//

#include <a_samp>

#define TOTAIS_CHECKS 9

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

new Float:Checkpoints[TOTAIS_CHECKS][3] =
{
    { 2240.4260,1353.1127,10.2698},
    { 2408.3813,1350.9872,7.1641},
    { 2405.2244,1213.0823,7.1641},
    { 2225.2783,1215.9548,10.7905},
    { 2239.3381,1352.7955,10.4686},
    { 2407.1101,1348.8556,7.1641},
    { 2406.0603,1212.8149,7.1641},
    { 2225.6289,1216.2898,10.2862},
    { 2239.7048,1353.0103,10.4016}
};
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/circuito", 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);
        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) {
            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] = false;
            Stats[playerid] = 0;
            SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк acabou o Race parabйns");
            DisablePlayerRaceCheckpoint(playerid);
        }
    }
    return true;
}
Reply


Messages In This Thread
[erro] checkpoints do gerador da fek! - by syslogg - 29.12.2010, 00:52
Respuesta: [erro] checkpoints do gerador da fek! - by ipsBruno - 29.12.2010, 01:03
Re: [erro] checkpoints do gerador da fek! - by syslogg - 29.12.2010, 01:28

Forum Jump:


Users browsing this thread: 2 Guest(s)