[H] /setfaction command (Similar to /setstat) - 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: [H] /setfaction command (Similar to /setstat) (
/showthread.php?tid=183510)
[H] /setfaction command (Similar to /setstat) -
Lee Strong - 15.10.2010
Hello there, I've recently started beginning work on my game-mode again after almost 2 years. After having updated it to be compatible with SAMP 0.3, I'm implementing some new features.
I've recently installed Dynamic MySQL factions into the script, this system is incompleted and I require a /setfaction command similar to the setstat command.. I'm not entirely sure how to compose this.
Here is an overview of the system variables:
Код HTML:
enum dfactionInfo
{
fName[32],
Float:fSpawnx,
Float:fSpawny,
Float:fSpawnz,
fBank,
fRank1,
fRank2,
fRank3,
fRank4,
fRank5,
fJoinRank,
fUseSkins,
fSkin1,
fSkin2,
fSkin3,
fSkin4,
fSkin5
};
new FactionInfo[MAX_FACTION][dfactionInfo];
This is where the information is stored for each faction when the server is loaded.
I wish to create a command to change these variables..
Since I'm quite lame at this so far, I tried changing the /setstat command (already in our game-mode) so I could use it to change the factions, however I'm not sure this is easily possible.
Re: [H] /setfaction command (Similar to /setstat) -
Lee Strong - 16.10.2010
Bumping this.
Re: [H] /setfaction command (Similar to /setstat) -
Voldemort - 16.10.2010
use /setstat cmd
like if(strcmp(tmp,"Name",true) == 0)
{
tmp = strtok(...
strmid(FactionInfo[id][fName],tmp,0,strlen(tmp),255);
}
and so on