• 05 Juin 2026, 01:02:28


Auteur Sujet: Ce code conssome t'il beaucoup ?  (Lu 1023 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne Eloctro

  • Pawno Fan
  • *
  • Grand Banditisme
  • Aight !
  • Messages: 846
    • Voir le profil
    • GtaSA-RP
Ce code conssome t'il beaucoup ?
« le: 24 Juillet 2010, 14:58:23 »
Bonjour ,
Je vient de faire un code pour faire une liste de Joueur par faction en une variable :
new MemberFaction[10][1500];
stock PutPlayerInFaction(playerid,factionid)
{
new string[400];
for(new i=1;i<MemberFaction[factionid][0];i++)
{
format(string, sizeof(string), "%s%d", string,MemberFaction[factionid][i]);
}
new NbMembreFac=strval(string);
new arrCoords[NbMembreFac+1][64];
split(MemberFaction[factionid], arrCoords, '|');
NbMembreFac++;
format(string, sizeof(string), "%d", NbMembreFac);
new length = strlen(string);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
format(MemberFaction[factionid], sizeof(MemberFaction[factionid]), "%d%d",offset, NbMembreFac);
for(new i=0;i<NbMembreFac-1;i++)
{
if(strlen(arrCoords[i])
{
format(MemberFaction[factionid], sizeof(MemberFaction[factionid]), "%s|%s", string,arrCoords[i]);
}
}
new name[64];
GetPlayerName(playerid, name, sizeof(name));
format(MemberFaction[factionid], sizeof(MemberFaction[factionid]), "%s|%s", string,name);
return 1;
}
stock ExitPlayerInFaction(playerid,factionid)
{
new string[400];
for(new i=1;i<MemberFaction[factionid][0];i++)
{
format(string, sizeof(string), "%s%d", string,MemberFaction[factionid][i]);
}
new NbMembreFac=strval(string);
new arrCoords[NbMembreFac+1][64];
split(MemberFaction[factionid], arrCoords, '|');
NbMembreFac--;
format(string, sizeof(string), "%d", NbMembreFac);
new length = strlen(string);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
format(MemberFaction[factionid], sizeof(MemberFaction[factionid]), "%d%d",offset, NbMembreFac);
new name[64];
GetPlayerName(playerid, name, sizeof(name));
for(new i=0;i<NbMembreFac;i++)
{
if(strcmp(arrCoords[i],name, true) != 0 && (strlen(arrCoords[i])))
{
format(string, sizeof(string), "%s|%s", string,arrCoords[i]);
}
}
return 1;
}
stock IsPlayerInFaction(playerid,factionid)
{
new string[400];
for(new i=1;i<MemberFaction[factionid][0];i++)
{
format(string, sizeof(string), "%s%d", string,MemberFaction[factionid][i]);
}
new NbMembreFac=strval(string);
new arrCoords[NbMembreFac+1][64];
split(MemberFaction[factionid], arrCoords, '|');
new name[64];
GetPlayerName(playerid, name, sizeof(name));
for(new i=0;i<NbMembreFac;i++)
{
if(strcmp(arrCoords[i],name, true) == 0 && (strlen(arrCoords[i])))
{
return 1;
}
}
return 0;
}
J'aimerais savoir si ce code peut faire crasher le Serveur merci :)
« Modifié: 24 Juillet 2010, 15:01:08 par coco76 »

Hors ligne raven181

  • *
  • Criminel
  • Messages: 45
    • Voir le profil
Re : Ce code conssome t'il beaucoup ?
« Réponse #1 le: 13 Août 2010, 23:30:54 »
A vue d'œil , il te prend des ressources mais je pense pas assez pour faire crasher un serveur...

Hors ligne steve76

  • *
  • Tueur en série
  • Messages: 153
    • Voir le profil
Re : Re : Ce code conssome t'il beaucoup ?
« Réponse #2 le: 14 Août 2010, 00:43:08 »
A vue d'œil , il te prend des ressources mais je pense pas assez pour faire crasher un serveur...

Tu as fini de Up tous les topics là? (Par exemple celui-ci date de 3semaines)
Surtout que tu réponds sans argumenter...