SA-MP Forums Archive
Faction un drift server - 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: Faction un drift server (/showthread.php?tid=278238)



Faction un drift server - lucianmemo - 21.08.2011

Hi

How can i create a gang like a faction in drift/stunts server?

With rank,base,leader.

Can you help me please?


Re: Faction un drift server - Darnell - 21.08.2011

You'll need to rip off a faction system of a roleplay gamemode and put it in your server, define enums, use a saving .ini system...


Re: Faction un drift server - Kush - 21.08.2011

Quote:
Originally Posted by Darnell
View Post
You'll need to rip off a faction system of a roleplay gamemode and put it in your server, define enums, use a saving .ini system...
What are you even talking about?

PHP Code:
#define pTeam[MAX_PLAYERS];
#define pRank[MAX_PLAYERS]; 
This is all you need.


Re: Faction un drift server - lucianmemo - 21.08.2011

PHP Code:
#define pTeam[MAX_PLAYERS];
#define pRank[MAX_PLAYERS]; 
This is all you need.[/QUOTE]

After i can add a faction?


Re: Faction un drift server - Kush - 21.08.2011

Quote:
Originally Posted by lucianmemo
View Post
PHP Code:
#define pTeam[MAX_PLAYERS];
#define pRank[MAX_PLAYERS]; 
This is all you need.
After i can add a faction?[/QUOTE]

PHP Code:
#define gTeam     [MAX_PLAYERS];
#define gRank   [MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
    if(
gTeam[playerid] = 0)
    {
        
SendClientMessage(playerid, -1"You are not part of any team!");
    }
    else if(
gTeam[playerid] = 1)
    {
        
SendClientMessage(playerid, -1"You are part of Team 1");
    }
    return 
1;
}
YCMD:getspecialweapon(playeridparams[], help)
{
    
#pragma unused help
    #pragma unused params
    
if(gTeam[playerid] = 0)
    {
        
SendClientMessage(playerid, -1"You don't get a weapon cause your not part of any team!");
    }
    else if(
gTeam[playerid] = 1)
    {
        if(
gRank[playerid] == 1) { GivePlayerWeapon(playerid2450); }
        if(
gRank[playerid] == 2) { GivePlayerWeapon(playerid3850); }
    }
    return 
1;

Couple examples of how it works.