PDA

View Full Version : gTeam dini Saving Problem ~ HELP !


razol
13/11/2011, 04:28 PM
Solved..

razol
13/11/2011, 04:58 PM
Anybody help please ? :S

mineralo
13/11/2011, 06:47 PM
you must team make in job id for can save team, I can help you little,
new Vampire[MAX_PLAYERS]
new Human[MAX_PLAYERS]
#define TEAM_VAMPIRE 1
#define TEAM_HUMAN 2
AddPlayerClassEx(TEAM_HUMAN,2,1529.3446,-888.6906,61.1224,49.6362,0,0,0,0,0,0);
AddPlayerClassEx(TEAM_VAMPIRE,2,1529.3446,-888.6906,61.1224,49.6362,0,0,0,0,0,0);
onplayerrequestspawn()
switch (classid) {

case 0:

{
GameTextForPlayer(playerid, "~w~Human",500, 3);
if(GetPlayerJobID(playerid) == 2)
{
GameTextForPlayer(playerid, "~w~Human~n~~n~~n~~n~~n~~g~ Available for you]", 500, 3);
return 1;
}
else
{
GameTextForPlayer(playerid, "~w~Human~n~~n~~n~~n~~n~~r~ Not available for you]", 500, 3);
return 1;
}
}
case 1:

{
GameTextForPlayer(playerid, "~w~Vampire",500, 3);
if(GetPlayerJobID(playerid) == 9)
{
GameTextForPlayer(playerid, "~w~Vampire~n~~n~~n~~n~~n~~g~ Available for you]", 500, 3);
return 1;
}
else
{
GameTextForPlayer(playerid, "~w~Vampire~n~~n~~n~~n~~n~~r~ Not available for you]", 500, 3);
return 1;
}
}
if(logged_in[playerid] == 1)
{
new pfile[100], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(pfile, sizeof(pfile), "Users/%s.ini",pname);
dini_IntSet(pfile, "Cash", GetPlayerMoney(playerid));
dini_IntSet(pfile, "Score", GetPlayerScore(playerid));
dini_IntSet(pfile, "Job", GetPlayerJobID(playerid));
}
logged_in[playerid] = 0;
return 1;
}
I hope you will finish and will help you