Team Balance F4 Detector
#1

Hello,I got problem when player Press F4 Team Balance is not working.And i dont know how to fix it.I hear it need detector but i dont know how to create it.If someone know please post here.
Reply
#2

What code are you having on OnPlayerRequestClass?

Edit: Try this. Not tested though.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(GetPVarInt(playerid, "hasrequested")) return 0;
    return 1;
}
public OnPlayerRequestSpawn(playerid)
{
    SetPVarInt(playerid, "hasrequested", 1);
    return 1;
}

public OnPlayerConnect(playerid)
{
    SetPVarInt(playerid, "hasrequested", 0);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    SetPVarInt(playerid, "hasrequested", 0);
    return 1;
}
Reply
#3

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1644.4078,-1133.8214,58.2172);
    SetPlayerCameraPos(playerid, 1647.6301,-1134.5725,58.2489);
    SetPlayerCameraLookAt(playerid, 1644.4078,-1133.8214,58.2172);
    SetPlayerFacingAngle(playerid,258.5584);
    SetPlayerTeam(playerid,0);
    if(classid == 0)
    {
        GameTextForPlayer(playerid, "~r~Terrorist", 1500, 3);
    }
    else if(classid == 1)
    {
        GameTextForPlayer(playerid, "~b~S.W.A.T", 1500, 3);
    }
    if(GetPVarInt(playerid, "hasrequested")) return 0;
    return 1;
}
This i used your suggest but not tested
Reply
#4

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1644.4078,-1133.8214,58.2172);
    SetPlayerCameraPos(playerid, 1647.6301,-1134.5725,58.2489);
    SetPlayerCameraLookAt(playerid, 1644.4078,-1133.8214,58.2172);
    SetPlayerFacingAngle(playerid,258.5584);
    SetPlayerTeam(playerid,0);
    if(classid == 0)
    {
        GameTextForPlayer(playerid, "~r~Terrorist", 1500, 3);
    }
    else if(classid == 1)
    {
        GameTextForPlayer(playerid, "~b~S.W.A.T", 1500, 3);
    }
    if(GetPVarInt(playerid, "hasrequested")) return 0;
    return 1;
}
This i used your suggest but not tested
Do that for all of the callback and put it on the top and tell me what's the next problem you are having(I am sure you will have).
Reply
#5

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Do that for all of the callback and put it on the top and tell me what's the next problem you are having(I am sure you will have).
You mean that Vars?But problem is in that i have Map Changer which is based on Request Class i mean when map change server is not restarting but its force Request class.
Reply
#6

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
You mean that Vars?But problem is in that i have Map Changer which is based on Request Class i mean when map change server is not restarting but its force Request class.
Hmmm that's a problem. I think you have to make a custom class selection.
Reply
#7

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
Hmmm that's a problem. I think you have to make a custom class selection.
aha.Huh....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)