Team saving -
samuel_hamza - 18.06.2010
Guys, I beg you, I need your answer really!
I will make it simple and clear for you to understand, first I use Dini saving system.
Second, I already did
Код:
dini_IntSet(file, "Team", GetPlayerTeam(playerid));
in "stock PlayerSave(playerid)"
And did
Код:
SetPlayerTeam(playerid, dini_Int(file, "Team"));
in /login command.
The problem is when someone does /login, he doesn't get into team, he still can request class...
I want the requesting system to be removed.
I removed this
Код:
public OnPlayerRequestClass(playerid,classid)
{
SetPlayerPos(playerid, -250.9738, 2585.6497,63.5703);
SetPlayerFacingAngle(playerid, 210.3500);
SetPlayerCameraPos(playerid, -248.9410, 2581.5327, 64.9334);
SetPlayerCameraLookAt(playerid, -250.9738, 2585.6497,63.5703);
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing. It's most fitting to the music
PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238); //music, duh
if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", 50, true, "i", playerid);
PlayerInfo[playerid][SpawnDance] = false; //preventing the timer to execute again
SetPlayerTeamFromClass(playerid, classid);
return 1;
}
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = 0;
return 1;
}
else if (classid == 1)
{
gTeam[playerid] = 1;
return 1;
}
else if (classid == 2)
{
gTeam[playerid] = 2;
return 1;
}
else if (classid == 3)
{
gTeam[playerid] = 3;
return 1;
}
else if (classid == 4)
{
gTeam[playerid] = 4;
return 1;
}
else if (classid == 5)
{
gTeam[playerid] = 5;
return 1;
}
return 1;
}
But I still can request class, I mean in the LV supermarket, and can't see players, but can change it and request anyteam!!
ONcE AGAIN, I really want that if someone /login and when successful, he gets into team in his userfile.
Thanks.
Re: Team saving -
aircombat - 18.06.2010
under login command use :
Код:
SpawnPlayer(playerid);
Re: Team saving -
samuel_hamza - 18.06.2010
What to use exactly please ? SetPlayerPos ? and then how to make him into team after spawning ?
Re: Team saving -
aircombat - 19.06.2010
public OnPlayerSpawn(playerid)
{
SetPlayerTeam(playerid, dini_Int(file, "Team"));
return 1;
}
Re: Team saving -
samuel_hamza - 19.06.2010
And remove "OnPlayerRequestClass" Right ?
Re: Team saving -
Kar - 19.06.2010
if u remove that how will u pick a skin in the first place
Re: Team saving -
samuel_hamza - 19.06.2010
There is already AddPlayerClass, there is skin there!
Re: Team saving -
Kar - 19.06.2010
onplayerrequestclass is where you pick the skin
well i (thought)..
Re: Team saving -
samuel_hamza - 19.06.2010
Quote:
Originally Posted by Kar
onplayerrequestclass is where you pick the skin
well i (thought)..
|
Dayum!! Got mixed up. Then you mean I just need to keep onplayerrequestclass, right ?
I just wanna if player use /login, he spawns in his team HQ that there is in userfilee without requeting it.
Re: Team saving -
samuel_hamza - 19.06.2010
And I'm using gteam as well!!
Need help