[H] /setfaction command (Similar to /setstat)
#1

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.
Reply
#2

Bumping this.
Reply
#3

use /setstat cmd

like if(strcmp(tmp,"Name",true) == 0)
{
tmp = strtok(...
strmid(FactionInfo[id][fName],tmp,0,strlen(tmp),255);
}

and so on
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)