SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 29/03/2012, 07:00 AM   #1
iOmar
Huge Clucker
 
iOmar's Avatar
 
Join Date: Jan 2012
Posts: 438
Reputation: 25
Default Class help

How can i make team(CLASS) like groove,so only player with [TAG] can join it...?? Please help me..
__________________
For All PC Games Click Here
iOmar is offline   Reply With Quote
Old 29/03/2012, 07:30 AM   #2
Reklez
Gangsta
 
Reklez's Avatar
 
Join Date: Mar 2012
Location: Philippines
Posts: 568
Reputation: 64
Default Re: Class help

this is example only

pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(classid)
    {
        case 105, 106, 107: //if player has skin id 105 106 107 - which is grove street
        {
            if(strfind("[TAG]", pname, false) != 1)
            {
                //if player has the [TAG] in his name the code that place here will be called
            } else {
               //if player doesn't have [TAG] in his name the code that place here will be called
            }
        }
    }
    return 1;
}
__________________

Asking a reputation for Server Advertisement? You kidding me, You are totally n00b!
Reklez is offline   Reply With Quote
Old 29/03/2012, 08:04 AM   #3
iOmar
Huge Clucker
 
iOmar's Avatar
 
Join Date: Jan 2012
Posts: 438
Reputation: 25
Default Re: Class help

Done.. BUt do i need to put groove class.....
__________________
For All PC Games Click Here
iOmar is offline   Reply With Quote
Old 29/03/2012, 08:09 AM   #4
Reklez
Gangsta
 
Reklez's Avatar
 
Join Date: Mar 2012
Location: Philippines
Posts: 568
Reputation: 64
Default Re: Class help

Yes you need to do that you have to add this function on GameInit/FilterscriptInit

pawn Code:
AddPlayerClass(skinid, X, Y, Z, Angle, Weapon1, weap1ammo, Weapon2, weap2ammo, Weapon3, weap3ammo);
__________________

Asking a reputation for Server Advertisement? You kidding me, You are totally n00b!
Reklez is offline   Reply With Quote
Old 29/03/2012, 08:25 AM   #5
iOmar
Huge Clucker
 
iOmar's Avatar
 
Join Date: Jan 2012
Posts: 438
Reputation: 25
Default Re: Class help

If i already have groove team than??
__________________
For All PC Games Click Here
iOmar is offline   Reply With Quote
Old 29/03/2012, 12:11 PM   #6
iOmar
Huge Clucker
 
iOmar's Avatar
 
Join Date: Jan 2012
Posts: 438
Reputation: 25
Default Re: Class help

Sorry For Double Post!!!
This is not Working!!! When i type this it says " OnPlayerRequestClass" already defined??
__________________
For All PC Games Click Here
iOmar is offline   Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP] Class Selection - Showing the class name? CrucixTM Scripting Help 13 26/04/2012 06:38 PM
Help Setting A Player Class before class selection Madd Kat Scripting Help 5 09/02/2012 06:19 PM
Looking for some PHP Class Meta Everything and Nothing 2 26/11/2011 04:06 PM
help me with Class Selection Showing the class name The_Cobra Help Archive 2 05/02/2010 06:22 PM
Class name? zFe Help Archive 2 13/02/2009 04:59 PM


All times are GMT. The time now is 10:44 AM.


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