SA-MP Forums Archive
This command is wierd as hell - 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: This command is wierd as hell (/showthread.php?tid=147898)



This command is wierd as hell - Antonio [G-RP] - 14.05.2010

Anybody want to be helpful and make it look good? Thanks ahah lol

pawn Код:
if(strcmp(cmd, "/makefaction", true) == 0)
{
if(gAdminOnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "You must be on duty to use this command!");
return 1;
}
if (PlayerInfo[playerid][pAdmin] < 8)
{
SendClientMessage(playerid, COLOR_RED, "Invalid admin level, you cannot use this command");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_USAGE, "USAGE: /makefaction [faction name] [faction ID]");
return 1;
}
new factionname[128];
factionname = strval(tmp);
new factionid = strval(tmp);
format(string, sizeof(string), "/settings/factions.cfg", playername);
new File: file = fopen(string, io_read);
new File:hFile;
hFile = fopen(string, io_append);
new var[32];//
format(var, 32, "%s fName\n", FactionInfo[factionid][fName]);fwrite(hFile, var);
format(var, 32, "%s fLeader\n", FactionInfo[factionid][fLeader]);fwrite(hFile, var);
format(var, 32, "%d fID\n", FactionInfo[factionid][fID]);fwrite(hFile, var);
format(var, 32, "%s fRank1\n", FactionInfo[factionid][fRank1]);fwrite(hFile, var);
format(var, 32, "%s fRank2\n", FactionInfo[factionid][fRank2]);fwrite(hFile, var);
format(var, 32, "%s fRank3\n", FactionInfo[factionid][fRank3]);fwrite(hFile, var);
format(var, 32, "%s fRank4\n", FactionInfo[factionid][fRank4]);fwrite(hFile, var);
format(var, 32, "%s fRank5\n", FactionInfo[factionid][fRank5]);fwrite(hFile, var);
fclose(hFile);
FactionInfo[factionid][fName] = factionname;
return 1;
}



Re: This command is wierd as hell - Assyria - 14.05.2010

So what is it what you want..?


Re: This command is wierd as hell - Antonio [G-RP] - 14.05.2010

To make the command work *evil laugh* aha!


Re: This command is wierd as hell - Steven82 - 14.05.2010

Um...ok here's a plan, How about you don't cut, then paste crap on your script(:, you know as damn well as i do that came from LA-RP/GTA:RP/Godfather. I know for a fact you didn't just script that.


Re: This command is wierd as hell - Antonio [G-RP] - 14.05.2010

Want to fucking bet buddy? I made that by myself. Is there something wrong with merging my two things (gang+service) into faction, without assholes like you coming to flame on my post? Get a fucking life kid. GTFO


Re: This command is wierd as hell - Steven82 - 14.05.2010

Um.. i didn't flame you just did, flaming is cussing, so....maybe you need to get a life "KID" and stop flaming.


Re: This command is wierd as hell - Assyria - 14.05.2010

Antonio, that was very stupid post, you think anyone will help you anymore?


Re: This command is wierd as hell - Steven82 - 14.05.2010

Quote:
Originally Posted by Assyria
Antonio, that was very stupid post, you think anyone will help you anymore?
Yes i very much agree with your comment.


Re: This command is wierd as hell - Antonio [G-RP] - 15.05.2010

Oh ha, steven grow some fucking balls get off my damn topic