Spawn with dialogs problem [rep]
#1

I've made a team & class selection in dialogs, now I will give the player spawn locations. I used this code:
pawn Код:
case DIALOG_SOLDIER:
        {
            if( response )
             if(gTeam[playerid] == TEAM_USA)
             {
                gPlayerClass[playerid] = SOLDIER_CLASS;
                AddPlayerClass(0,-251.3996,2602.4814,62.8582,6.5801,0,0,0,0,0,0);
                GivePlayerWeapon(playerid, 4, 1);//knife
                GivePlayerWeapon(playerid, 16, 2);//grenades
                GivePlayerWeapon(playerid, 24, 15);//desert eagle
                GivePlayerWeapon(playerid, 31, 60);//m4
                GivePlayerWeapon(playerid, 26, 15);//sawn off shotgun
                GivePlayerWeapon(playerid, 29, 30);//mp5
                SetPlayerHealth(playerid, 75);
                return 1;
            }
            else if(gTeam[playerid] == TEAM_EURO)
            {
                gPlayerClass[playerid] = SOLDIER_CLASS;
                AddPlayerClass(0,-204.5513,1090.3835,19.7422,314.8796,0,0,0,0,0,0);
                GivePlayerWeapon(playerid, 4, 1);//knife
                GivePlayerWeapon(playerid, 16, 2);//grenades
                GivePlayerWeapon(playerid, 24, 15);//desert eagle
                GivePlayerWeapon(playerid, 31, 60);//m4
                GivePlayerWeapon(playerid, 26, 15);//sawn off shotgun
                GivePlayerWeapon(playerid, 29, 30);//mp5
                SetPlayerHealth(playerid, 75);
                return 1;
            }
I'll want to spawn with the ''Play'' button in my dialog. How to do that?
Reply
#2

I don't think it is possible, however you can be able to make it so that when they click spawn, you can make their screen all black, and then make a dialogue that is nothing except "play".
Reply
#3

Use SpawnPlayer(playerid, X, Y, Z);
Reply
#4

Okayy I have this:
pawn Код:
case DIALOG_SOLDIER:
        {
            if( response )
             if(gTeam[playerid] == TEAM_USA)
             {
                gPlayerClass[playerid] = SOLDIER_CLASS;
                SpawnPlayer(playerid, -251.3996,2602.4814,62.8582);
                GivePlayerWeapon(playerid, 4, 1);//knife
                GivePlayerWeapon(playerid, 16, 2);//grenades
                GivePlayerWeapon(playerid, 24, 15);//desert eagle
                GivePlayerWeapon(playerid, 31, 60);//m4
                GivePlayerWeapon(playerid, 26, 15);//sawn off shotgun
                GivePlayerWeapon(playerid, 29, 30);//mp5
                SetPlayerHealth(playerid, 75);
                return 1;
            }
public OnPlayerRequestClass(playerid, classid)
{
    SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0); // Without this you'll be kicked when you spawn. Set it to wherever you want.
   
    return 1;
}
the spawning is working, but the coords are not working. I spawn every time on the same place. What to do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)