Server Crash after Choose Team
#9

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == DTEAMS)
        {
            if(!response) return  ShowPlayerDialog(playerid, DTEAMS, DIALOG_STYLE_LIST, "Teams:", ""#EMB_USA"United States of America\n"#EMB_GERMANY"Germany", "Select", "");
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        new JoinMessage[128];
                        gTeam[playerid] = ARMY_TEAM;
                        SetPlayerTeam(playerid, 0);
                        SetPlayerPos(playerid, 203.51, 1861.86, 13.14);
                        SetPlayerSkin(playerid, 287);
                        SetPlayerColor(playerid, A_COLOR);
                        SendClientMessage(playerid, COLOR_USA, "[Army]: You have chosen Army Team.");
                    format(JoinMessage, sizeof(JoinMessage), "Player%s(%d) has joined the Army Team", GetName);
                    SendClientMessageToAll(COLOR_LIGHTBLUE, JoinMessage);
                        SpawnPlayer(playerid);
                    }
                    case 1:
                    {
                        new JoinMessage[128];
                        gTeam[playerid] = TERROR_TEAM;
                        SetPlayerPos(playerid, 268.80, 1883.47, -30.09);
                        SetPlayerSkin(playerid, 16);
                        SetPlayerColor(playerid, T_COLOR);
                        SetPlayerTeam(playerid, 1);
                        SendClientMessage(playerid, COLOR_RED, "[Terrorist]: You have chosen Terrorist Team.");
                    format(JoinMessage, sizeof(JoinMessage), "Player%s(%d) has joined the Terrorist Team", GetName);
                    SendClientMessageToAll(COLOR_LIGHTBLUE, JoinMessage);
                        SpawnPlayer(playerid);
                    }
                }
            }
        }
        return 1;
}


add this on bottom of the script

stock GetName(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
    return Name;
}
Reply


Messages In This Thread
Server Crash after Choose Team - by ChandraLouis - 23.03.2014, 12:14
Re: Server Crash after Choose Team - by Equuuuin0X - 23.03.2014, 12:16
Re: Server Crash after Choose Team - by ChandraLouis - 23.03.2014, 12:21
Re: Server Crash after Choose Team - by Equuuuin0X - 23.03.2014, 12:22
Re: Server Crash after Choose Team - by Konstantinos - 23.03.2014, 12:26
Re: Server Crash after Choose Team - by ChandraLouis - 23.03.2014, 12:26
Re: Server Crash after Choose Team - by Zeppo - 23.03.2014, 12:30
Re: Server Crash after Choose Team - by Evocator - 23.03.2014, 12:34
Re: Server Crash after Choose Team - by Equuuuin0X - 23.03.2014, 12:36
Re: Server Crash after Choose Team - by Konstantinos - 23.03.2014, 12:38

Forum Jump:


Users browsing this thread: 2 Guest(s)