One problem
#1

hi, i have one problem: i'm creating races with CP and @finish CP it should do this...Well, its working untill the winner is NPC...Even I lose im still get award.
BTW: this messege didn't show up.
pawn Код:
stock RaceStats(playerid)
    {
    if(IsPlayerNPC(playerid))
        {
        SendClientMessageToAll(RAUDONA,"win npc");
        for(new p=0; p<MAX_PLAYERS; p++)
            {
            new names[26];
            GetPlayerName(p,names,sizeof(names));
            if(!strcmp(names,"NPC_Racer"))
                {
                Kick(p);
                IsNPCWinner=true;
                IsNPCInRace=false;
                }
            }
        ConnectNPC("NPC_Racer","steady");
        return 1;
        }
    if(IsNPCWinner)
        {
        MissionFailed(playerid);
        IsNPCWinner=false;
        DisablePlayerRaceCheckpoint(playerid);
        }
    else
        {
        DisablePlayerRaceCheckpoint(playerid);
        GivePlayerMoney(playerid,10000);
        Mprogress6[playerid]=0;
        IsPlayerInMission[playerid] = 0;
        GameTextForPlayer(playerid,"~w~+10.000$",1500,5);
        MissionComplete(playerid);
        IsNPCWinner=false;
        IsNPCInRace=false;
        for(new p=0; p<MAX_PLAYERS; p++)
            {
            new names[26];
            GetPlayerName(p,names,sizeof(names));
            if(!strcmp(names,"NPC_Racer"))
                {
                Kick(p);
                }
            }
        ConnectNPC("NPC_Racer","steady");
        }
    return 1;
    }
Reply
#2

***BUMBING***

BTW:i guessing that npc can't enter to CP? So maybe someone know how to do that?
Reply
#3

OnPlayerEnterCheckpoint is called for NPC's
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)