SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 21/08/2011, 12:21 PM   #1
lucianmemo
Little Clucker
 
Join Date: Aug 2011
Location: Bacau, Romania.
Posts: 17
Reputation: 1
Default Faction un drift server

Hi

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

With rank,base,leader.

Can you help me please?
lucianmemo is offline  
Old 21/08/2011, 12:22 PM   #2
Darnell
Gangsta
 
Darnell's Avatar
 
Join Date: Jul 2010
Posts: 824
Reputation: 35
Default Re: Faction un drift server

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...
Darnell is offline  
Old 21/08/2011, 12:26 PM   #3
Kush
Gangsta
 
Join Date: May 2011
Posts: 781
Reputation: 123
Default Re: Faction un drift server

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.
Kush is offline  
Old 21/08/2011, 12:32 PM   #4
lucianmemo
Little Clucker
 
Join Date: Aug 2011
Location: Bacau, Romania.
Posts: 17
Reputation: 1
Default Re: Faction un drift server

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

After i can add a faction?
lucianmemo is offline  
Old 21/08/2011, 12:45 PM   #5
Kush
Gangsta
 
Join Date: May 2011
Posts: 781
Reputation: 123
Default Re: Faction un drift server

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.
Kush is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 12:29 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.