Dini load.. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dini load.. (
/showthread.php?tid=153795)
Dini load.. -
[ES]Leszek_ - 10.06.2010
Код:
Hello everybody i get any problem with the load...
also i want to load points (expirance or so(skill,respect)) but i cant load the pints... i dont know why...
This is the code:
Код:
new Text:SkillazTD[MAX_PLAYERS],SkL[40];
Код:
forward AktualizacjaSkilla(playerid);
Код:
enum InfoSkilla
{
SkillGracza,
};
Код:
new SkilACInfo[MAX_PLAYERS][InfoSkilla];
onfilterscriptinit...
Код:
SetTimer("Skillaz",2000,true);
Код:
SkillazTD[x] = TextDrawCreate(550.0, 350.0-10.0, " ");
TextDrawFont(SkillazTD[x], 3);
TextDrawSetOutline(SkillazTD[x], 1);
TextDrawAlignment(SkillazTD[x], 1);
TextDrawColor(SkillazTD[x], 0x295921FF);
onplayerspawn
[coda]format(SkilACInfo[playerid][SkillGracza], 256, "%d");/////////!!!!!!!!!!!!!!This one want to load the points?
TextDrawShowForPlayer(playerid,SkillazTD[playerid]);
onplayerconnect
Код:
new name[MAX_PLAYER_NAME], ip[15];
GetPlayerName(playerid, name, sizeof name);
GetPlayerIp(playerid, ip, sizeof ip);
format(str, sizeof str, "/Serwer/Skill/%s.es", name);
new File:account = fopen(str, io_write);
if (account)
{
new file[128];
{
format(file, sizeof file, "[Skill]: %d\r\n",SkilACInfo[playerid][SkillGracza]);
{ fwrite(account, file); }
}
fclose(account);
Код:
stock SkillazsT(playerid)
{
new SkL=SkilACInfo[playerid][SkillGracza];
if(SkL < 100) return 1;
else if(SkL >= 100 && SkL < 200) return 2;
else if(SkL >= 200 && SkL < 300) return 3;
else if(SkL >= 300 && SkL < 400) return 4;
else return -1;
}
commandtext
Код:
if (strcmp("/Skill", cmdtext, true, 10) == 0)
{
format(str, sizeof(str), "Twoj Skill : %d", SkilACInfo[playerid][SkillGracza]);//sry mate polish
SendClientMessage(playerid, 0xFFFFFF, str);
AktualizacjaSkilla(playerid);
return 1;
}
Код:
public AktualizacjaSkilla(playerid)
{
if(IsPlayerConnected(playerid))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
format(str, sizeof str, "/Serwer/Skill/%s.es", name);
new File:account = fopen(str, io_write);
if (account)
{
new file[128];
{
format(file, sizeof file, "%d",SkilACInfo[playerid][SkillGracza]);
{ fwrite(account, file); }
fclose(account);
}
}
}
return 1;
}
forward Skillaz(playerid);
public Skillaz(playerid)
{
for(new p=0; p<MAX_PLAYERS; p++)
{
if(IsPlayerConnected(p))
{
AktualizacjaSkilla(playerid);
format(SkL,sizeof SkL,"Skill: %d",SkilACInfo[p][SkillGracza]);
AktualizacjaSkilla(playerid);
TextDrawSetString(SkillazTD[p],SkL);
AktualizacjaSkilla(playerid);
}
}
return 1;
}
Thats is all who i get
i think that is wrong:
Код:
format(SkilACInfo[playerid][SkillGracza], 256, "%d");/////////!!!!!!!!!!!!!!This one want to load the points?
TextDrawShowForPlayer(playerid,SkillazTD[playerid]);
i wait for answers <3 lov ya and thx
Re: Dini load.. -
[ES]Leszek_ - 10.06.2010
help me?
Re: Dini load.. -
[ES]Leszek_ - 11.06.2010
help please