SA-MP Forums Archive
Class Selection - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Class Selection (/showthread.php?tid=606205)



Class Selection - Zevcore - 01.05.2016

Hello, I do not want to join the server show a selection of class , I gave something like this :

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SpawnPlayer(playerid);
    
ShowPlayerDialog(playeridMIASTODIALOG_STYLE_LIST"WYBIERZ MIASTO * {0099CC}PRS""Las Venturas\nLos Santos\nSan Fierro""Wybierz""");
    
//
    
return 1;

PHP код:
if(dialogid == MIASTO)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
1:
                {
                    new 
str[500], name[24];
                    
GetPlayerName(playeridname24);
                    
SetPlayerPos(playerid1664.1937,888.3260,10.7106);
                    
SetSpawnInfo(playerid, -101664.1937,888.3260,10.71060.0000000);
                    
SpawnPlayer(playerid);
                    
format(strsizeof(str), "{0099CC}%s{FFFFFF}, obudziłeś się w Las Venturas!"name);
                    
SendClientMessage(playerid, -1str);
                }
                case 
2:
                {
                    new 
str[500], name[24];
                    
GetPlayerName(playeridname24);
                    
SetPlayerPos(playerid1645.2332,-1148.2925,24.1930);
                    
SetSpawnInfo(playerid, -101645.2332,-1148.2925,24.19300.0000000);
                    
SpawnPlayer(playerid);
                    
format(strsizeof(str), "{0099CC}%s{FFFFFF}, obudziłeś się w Los Santos!"name);
                    
SendClientMessage(playerid, -1str);
                }
                case 
3:
                {
                    new 
str[500], name[24];
                    
GetPlayerName(playeridname24);
                    
SetPlayerPos(playerid, -1527.3885,448.9813,7.4250);
                    
SetSpawnInfo(playerid, -10, -1527.3885,448.9813,7.42500.0000000);
                    
SpawnPlayer(playerid);
                    
format(strsizeof(str), "{0099CC}%s{FFFFFF}, obudziłeś się w San Fierro!"name);
                    
SendClientMessage(playerid, -1str);
                }
            }
        }
    } 
But it is further , not skip it .