i was wondering if i could get some help with this
#1

this is a script for my DM server having trouble Checking if the player is already on a team
pawn Код:
public OnPlayerSpawn(playerid)
    {
    new money = GetPlayerMoney(playerid);
    ResetPlayerWeapons(playerid);
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, money);
   
    SetPlayerPos(playerid, 1283.73937988,64.11292267,1866.44262695);
    SetPlayerTeam(playerid, 3);
    SetPlayerColor(playerid, COLOR_WHITE);

    new skinid = GetPlayerSkin(playerid);
    new teamid = GetPlayerTeam(playerid);
   
    new team1 = SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
    new team2 = SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);
    new money = GetPlayerMoney(playerid);
    {
    if teamid = team1
    SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
    }
    }
    else
    {
    if teamid = team2
    SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);
    }
    }
    else
    {
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "CHOOSE YOUR TEAM", "Red Team[The Assualting Team]\nBlue Team[The Defensive Team]", "Chose", "Cancel");
    return 1;
    }
Reply
#2

Bump!!!!
Reply
#3

bump!!!!
Reply
#4

Stop bumping every hour. You're not special.
Reply
#5

if i dont bump , it will get lost, and not seen, meaning no Assistance and i dont think im specail, instead of people like you putting other people Down
Reply
#6

I did it

pawn Код:
public OnPlayerSpawn(playerid)
{
    new money = GetPlayerMoney(playerid);
    new skinid = GetPlayerSkin(playerid);
    new teamid = GetPlayerTeam(playerid);
    new team1 = SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
    new team2 = SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);
    ResetPlayerWeapons(playerid);
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, money);
    SetPlayerPos(playerid, 1283.73937988,64.11292267,1866.44262695);
    SetPlayerTeam(playerid, 3);
    SetPlayerColor(playerid, COLOR_WHITE);
    if(teamid == team1)
    {
        SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
    }
    else
    {
        if(teamid == team2)
        {
            SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);
        }
        else
        {
            ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "CHOOSE YOUR TEAM", "Red Team[The Assualting Team]\nBlue Team[The Defensive Team]", "Chose", "Cancel");
            return 1;
        }
    }
    return 1;
}

I hope i have helped
Reply
#7

Wait, surely theres no point in checking to see what team someones in, because if you set a players team, it removes them from the other team anyway?

Sorry ive probably missed the point, i just proof read your code...
Reply
#8

Well, i just testing in game, it still brings up the Dialog when you die but it does spawn you at the right spot , Nice work just gotta figure out out to make dialog go away now heeh
Reply
#9

well i got it
removed the return 1; on the dialog, fixed it so dialog doesnt show when you respawn thank rjjjj
Reply
#10

i Discovered 1 more problem im unsure how to fixm only on blue team it shows up, thats team2
pawn Код:
public OnPlayerSpawn(playerid)
    {
        new money = GetPlayerMoney(playerid);
        new skinid = GetPlayerSkin(playerid);
        new teamid = GetPlayerTeam(playerid);
        new team1 = SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
        new team2 = SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);

        ResetPlayerWeapons(playerid);
        ResetPlayerMoney(playerid);
        GivePlayerMoney(playerid, money);
       
        if(teamid == team1)
        {
        SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
        }
        else
        {
        if(teamid == team2)
        {
        SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);
        }
        else
        {
        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "CHOOSE YOUR TEAM", "Red Team[The Assualting Team]\nBlue Team[The Defensive Team]", "Chose", "Cancel");
        }
        }
        return 1;
    }
Reply
#11

got anymore ideas im stumped again just for the blue team
Reply
#12

bump!!!!!!!
Quote:
Originally Posted by fangoth1
Посмотреть сообщение
i Discovered 1 more problem im unsure how to fixm only on blue team it shows up, thats team2
pawn Код:
public OnPlayerSpawn(playerid)
    {
        new money = GetPlayerMoney(playerid);
        new skinid = GetPlayerSkin(playerid);
        new teamid = GetPlayerTeam(playerid);
        new team1 = SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
        new team2 = SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);

        ResetPlayerWeapons(playerid);
        ResetPlayerMoney(playerid);
        GivePlayerMoney(playerid, money);
       
        if(teamid == team1)
        {
        SetSpawnInfo(playerid, 1, skinid, 1351.2615966797, 348.85372924805, 19.296350479126, 0, 22, 150, 0, 0, 0, 0);
        }
        else
        {
        if(teamid == team2)
        {
        SetSpawnInfo(playerid, 2, skinid, 83.93970489502, -149.35932922363, 2.2334928512573, 0, 22, 150, 0, 0, 0, 0);
        }
        else
        {
        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "CHOOSE YOUR TEAM", "Red Team[The Assualting Team]\nBlue Team[The Defensive Team]", "Chose", "Cancel");
        }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)