10.06.2010, 20:01
Код:
Hello everybody i get any problem with the load...Код:[xxx]
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, };onfilterscriptinit...Код:new SkilACInfo[MAX_PLAYERS][InfoSkilla];
Код:SetTimer("Skillaz",2000,true);onplayerspawnКод: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);
[coda]format(SkilACInfo[playerid][SkillGracza], 256, "%d");/////////!!!!!!!!!!!!!!This one want to load the points?
TextDrawShowForPlayer(playerid,SkillazTD[playerid]);
Код:
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; }
Код:
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; }
i think that is wrong:
Код:
format(SkilACInfo[playerid][SkillGracza], 256, "%d");/////////!!!!!!!!!!!!!!This one want to load the points? TextDrawShowForPlayer(playerid,SkillazTD[playerid]);