Hello OnPlayerEnterCheckpoint
#1

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
team[playerid] == TEAM_HUMAN)
    {
        new 
string[256];
        if(
Map[EvacType] == 1)
        {
            
SetPlayerInterior(playerid0);
            
SetPlayerPos(playerid249.88091852.46958.7625);
            
SetPlayerCameraPos(playerid250.01321849.39338.7734);
            
SetPlayerCameraLookAt(playerid249.88091852.46958.7625);
            
SetPlayerFacingAngle(playerid177.0050);
            
TogglePlayerSpectating(playerid1);
            
//SetPlayerInterior(playerid,0);
            //SetPlayerPos(playerid,-1408.2051,-970.8841,198.9738);
            
format(string,sizeof(string), ""COL_WHITE"["COL_BLUE"HUMAN"COL_WHITE"] %s Has rached to evac point with "COL_RED"%d kills"COL_WHITE" in dhis round! He will come human next round!",PlayerName(playerid), pInfo[playerid][pKillsIn1Map]);
            
SendClientMessageToAll(-1,string);
            
DisablePlayerCheckpoint(playerid);
            
CurePlayer(playerid);
            
GivePlayerXP(playerid,50);
            
pInfo[playerid][pEvac]++;
            
pInfo[playerid][pCoins]++;
            
//SetPlayerColor(playerid,COLOR_YELLOW);
        
}
                return 
1;
                } 
I add just TogglePlayerSpectating(playerid, 1);
The Problem is when i enter checkpoint he spawn mee.
Reply
#2

I think, you just looking for function ForceClassSelection(playerid); - it spawns you to choosing a class.
Then it will be like this:

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(team[playerid] == TEAM_HUMAN)
    {
        new string[256];
        if(Map[EvacType] == 1)
        {
            ForceClassSelection(playerid);
            TogglePlayerSpectating(playerid, true);
            TogglePlayerSpectating(playerid, false);
            format(string,sizeof(string), ""COL_WHITE"["COL_BLUE"HUMAN"COL_WHITE"] %s Has rached to evac point with "COL_RED"%d kills"COL_WHITE" in dhis round! He will come human next round!",PlayerName(playerid), pInfo[playerid][pKillsIn1Map]);
            SendClientMessageToAll(-1,string);
            DisablePlayerCheckpoint(playerid);
            CurePlayer(playerid);
            GivePlayerXP(playerid,50);
            pInfo[playerid][pEvac]++;
            pInfo[playerid][pCoins]++;
            //SetPlayerColor(playerid,COLOR_YELLOW);
        }
                return 1;
                }
Reply
#3

I dont want to make calss selection i want to hide the map with this TogglePlayerSpectating(playerid, 1);
Reply
#4

AnyOne?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)