Help: Delay Spawn Player
#9

Quote:
PHP код:
forward ClassSelection(playerid, class); 
public 
ClassSelection(playerid, class){ 
    
//here you change the player's class: 0 = Negros, 1 = Civiles, 2 = Mafia, etc. 

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[]){ 
    if(
dialogid == 1){ 
        
SendClientMessage(playerid, -1"Your class will be changed in 10 seconds."); 
        
SetTimerEx("ClassSelection"10000false"ii"playeridlistitem); 
    } 

CMD:class(playerid,params[])  
{  
    
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Equipos","\nNegros\nCiviles\nMafia\nNang\nSwat\nSurenos\nBiker\nRich\nFarmers\nMechanic\nPimp\nSoldados" "Select""");  
    return 
1

I can't understand what you want

Very thx, solve it!!, I have a problem now ... I have 2 dialogues, and every time I use / class the dialog 0 is used, why does this happen??
PHP код:
new SKIN_MODELS[] = {
    
21,
    
2,
    
124,
    
122,
    
285,
    
108,
    
248,
    
295,
    
159,
    
50,
    
296,
    
287
};
new 
SKIN_NAMES[][] = {
    
"__Negros",
    
"_Civiles",
    
"___Mafia",
    
"____Nang",
    
"____Swat",
    
"_Surenos",
    
"___Biker",
    
"____Rich",
    
"_Farmers",
    
"Mechanic",
    
"____Pimp",
    
"Soldados"
};
public 
OnPlayerRequestClass(playeridclassid)
{
    
PlayAudioStreamForPlayer(playerid"http://www.debbiewiseman.co.uk/samples/warriors.mp3");
    
SetSpawnInfo(playerid000030000000);
    
TogglePlayerSpectating(playeridtrue);
    
SetTimerEx("login_dialog"00"i"playerid);
const 
MAX_SKINS 312;
    static 
string[MAX_SKINS 16];
    if (
string[0] == EOS) {
        for (new 
iMAX_SKINSi++) {
            
format(stringsizeof string"%s%i\tID: %i\n"stringii);
        }
    }
    
    return 
ShowPreviewModelDialog(playerid0"Selecciуn de Equipo"SKIN_MODELS,SKIN_NAMES "Select""Cancel");
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid == 0)
{
        switch(
listitem)
{
case 
0: {
  switch(
random(6)) // Negros
  
{
        case 
0:
        {
         
GameTextForPlayer(playerid"~g~Skin Changed!"30003);
         
SetPlayerSkin(playerid21);
         
SetSpawnInfo(playerid,0,21,-2636.9077,260.5389,4.3281,75.9486,30,150,25,50,29,150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
1:
        {
         
GameTextForPlayer(playerid"~g~Skin Changed!"30003);
         
SetPlayerSkin(playerid21);
         
SetSpawnInfo(playerid,0,21,-2659.7424,260.6835,4.6328,20.2774,30,150,25,50,29,150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
2:
        {
         
GameTextForPlayer(playerid"~g~Skin Changed!"30003);
         
SetPlayerSkin(playerid21);
         
SetSpawnInfo(playerid,0,21,-2695.9822,262.4749,4.6328,258.9438,30,150,25,50,29,150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
3:
        {
         
GameTextForPlayer(playerid"~g~Skin Changed!"30003);
         
SetPlayerSkin(playerid21);
         
SetSpawnInfo(playerid,0,21,-2694.5286,276.3913,4.3359,230.1168,30,150,25,50,29,150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
4:
        {
         
GameTextForPlayer(playerid"~g~Skin Changed!"30003);
         
SetPlayerSkin(playerid21);
         
SetSpawnInfo(playerid,0,21,-2659.1301,275.6968,4.3359,79.7154,30,150,25,50,29,150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
5:
        {
         
GameTextForPlayer(playerid"~g~Skin Changed!"30003);
         
SetPlayerSkin(playerid21);
         
SetSpawnInfo(playerid,0,21,-2665.8315,237.6608,4.3359,96.0087,30,150,25,50,29,150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
}
}
}
return 
1;
}
CMD:class(playerid,params[])
{
    
GetPlayerHealth(playeridhealth);
    
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"Equipos","\nNegros\nCiviles\nMafia\nNang\nSwat\nSurenos\nBiker\nRich\nFarmers\nMechanic\nPimp\nSoldados" "Select""");
    
SendClientMessage(playerid, -1"Your class will be changed in 10 seconds.");
    
SetTimerEx("ClassSelection"10000false"i"playerid);
 
}
public 
ClassSelection(playeriddialogidresponselistiteminputtext[])
{
switch(
listitem)
{
case 
0: {
  switch(
random(6)) // Negros
  
{
        case 
0:
        {
         
SetPlayerSkin(playerid19);
         
GivePlayerWeapon(playerid30150);
         
GivePlayerWeapon(playerid2550);
         
GivePlayerWeapon(playerid29150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
1:
        {
         
SetPlayerSkin(playerid19);
         
SetPlayerPos(playerid, -2659.7424,260.6835,4.6328);
         
GivePlayerWeapon(playerid30150);
         
GivePlayerWeapon(playerid2550);
         
GivePlayerWeapon(playerid29150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
2:
        {
         
SetPlayerSkin(playerid19);
         
SetPlayerPos(playerid, -2695.9822,262.4749,4.6328);
         
GivePlayerWeapon(playerid30150);
         
GivePlayerWeapon(playerid2550);
         
GivePlayerWeapon(playerid29150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
3:
        {
         
SetPlayerSkin(playerid19);
         
SetPlayerPos(playerid, -2694.5286,276.3913,4.3359);
         
GivePlayerWeapon(playerid30150);
         
GivePlayerWeapon(playerid2550);
         
GivePlayerWeapon(playerid29150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
4:
        {
         
SetPlayerSkin(playerid19);
         
SetPlayerPos(playerid,-2659.1301,275.6968,4.3359);
         
GivePlayerWeapon(playerid30150);
         
GivePlayerWeapon(playerid2550);
         
GivePlayerWeapon(playerid29150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
        case 
5:
        {
         
SetPlayerSkin(playerid19);
         
SetPlayerPos(playerid, -2665.8315,237.6608,4.3359);
         
GivePlayerWeapon(playerid30150);
         
GivePlayerWeapon(playerid2550);
         
GivePlayerWeapon(playerid29150);
         
SetPlayerColor(playeridcolor_NEGROS);
        }
  }

Reply


Messages In This Thread
Help: Delay Spawn Player - by bookknp - 11.05.2018, 05:31
Re: Help: Delay Spawn Player - by Vennox - 11.05.2018, 07:41
Re: Help: Delay Spawn Player - by bookknp - 11.05.2018, 08:01
Re: Help: Delay Spawn Player - by CrystalGamer - 11.05.2018, 09:51
Re: Help: Delay Spawn Player - by bookknp - 11.05.2018, 17:14
Re: Help: Delay Spawn Player - by Vennox - 11.05.2018, 22:07
Re: Help: Delay Spawn Player - by bookknp - 11.05.2018, 22:34
Re: Help: Delay Spawn Player - by Vennox - 12.05.2018, 09:56
Re: Help: Delay Spawn Player - by bookknp - 12.05.2018, 20:08
Re: Help: Delay Spawn Player - by bookknp - 13.05.2018, 01:34

Forum Jump:


Users browsing this thread: 3 Guest(s)