Help! Serious condition! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help! Serious condition! (
/showthread.php?tid=499424)
Help! Serious condition! -
RyanPetersons - 08.03.2014
OnPlayerRequestSpawn:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new string[250];
if(gPlayerLogged[playerid] != 1)
{
SendClientMessage(playerid,COLOR_WHITE, "Please Login Before Spawning");
return 0;
}
else
{
SpawnPlayer(playerid);
if(dini_Exists(PlayerPath(playerid)))
{
LoadPlayerOrgInfo(playerid);
}
else if(!dini_Exists(PlayerPath(playerid)))
{
dini_Create(PlayerPath(playerid));
}
format(string,sizeof(string),"Organization: {FFFFFF}%s",GetOrgName(PlayerOrg[playerid]));
SendClientMessage(playerid, COLOR_SAMP, string);
}
return 1;
}
stock LoadPlayerOrgInfo:
pawn Код:
stock LoadPlayerOrgInfo(playerid)
{
new string[45];
format(string,sizeof(string),"%s",dini_Get(PlayerPath(playerid),"Org"));
PlayerOrg[playerid] = GetOrgID(string);
new string2[28];
PlayerMember[playerid] = dini_Int(PlayerPath(playerid),"Member");
PlayerADV[playerid] = dini_Int(PlayerPath(playerid),"adv");
PlayerCo[playerid] = dini_Int(PlayerPath(playerid),"co");
PlayerLeader[playerid] = dini_Int(PlayerPath(playerid),"Leader");
PlayerTrial[playerid] = dini_Int(PlayerPath(playerid),"Trial");
CollectedWage[playerid] = dini_Int(PlayerPath(playerid), "CollectedWage");
if (strcmp(Organization[PlayerOrg[playerid]][Leader], PlayerName(playerid),true) == 0 && PlayerOrg[playerid] != 0)
{
PlayerLeader[playerid] = 1;
}
return 1;
}
No Errors.
But a bug:
The saving org info stock is correct. It saves the information.and PlayerPath stock is also correct. It creates the dini and saves the information. but the LoadPlayerOrgInfo does not works. I don't why?
It doesnt loads the player org info.I've tried the above function of loading player org info at OnPlayerConnect still that bug and have tried also on login dialog and onplayerspawn also. but no errors but the bug causes. Please help with it!
Re: Help! Serious condition! -
RyanPetersons - 08.03.2014
bump! as no one replied
Re: Help! Serious condition! -
RyanPetersons - 08.03.2014
bump! no one replied
Re: Help! Serious condition! -
RyanPetersons - 08.03.2014
bump
Re: Help! Serious condition! -
RyanPetersons - 08.03.2014
fucking bump again!
Re: Help! Serious condition! -
doreto - 08.03.2014
Stop fucking bumping!
Check this
http://forum.sa-mp.com/announcement.php?f=12
Re: Help! Serious condition! -
RyanPetersons - 08.03.2014
THEN HELP ME WITH THIS!