SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 25/06/2012, 05:30 PM   #61
Akmet
Big Clucker
 
Join Date: Feb 2009
Posts: 54
Reputation: 0
Default AW: How to use y_classes for MUCH better class selection.

Hey there!

First i have to say that this is very awesome and i realy like it!

But now there is a little question:
How can I easily dont set a player to a class, when i'm creating it with addclass...

About my system:
I gave each player a few spawns which are so individual that I have to create them at connecting.
In fact that the other players shouldn't use the spawns of an other player & I don't want to use Class_SetPlayer at each time for each player (what takes a lot of time I think) I'm searching for a simple alternative.

Maybe you can explain where you sets a player to use a class.

greetz
Akmet


//edit:
found it by mysql:

just change Group_SetClass(forgroup, class, true); to Group_SetClass(forgroup, class, false); in y_classgroups
__________________
I'm german and no, I don't speak English well! If you found a misstake, be happy and eat it!
[/CENTER]

Last edited by Akmet; 26/06/2012 at 07:59 PM.
Akmet is offline   Reply With Quote
Old 03/07/2012, 02:32 AM   #62
Nicholas.
Guest
 
Posts: n/a
Default Re: How to use y_classes for MUCH better class selection.

This is a very neat feature. I have decided to use it in my gamemode but I have couple of problems.

I coded a feature into the script using y_classes but when I compile the script I receive this error.

pawn Code:
pawno\include\YSI\y_classes.inc(545) : error 017: undefined symbol "Group_SetPlayer"

So I added the y_groups include also and it compiled fine without errors. Is there another way I could fix and compile without errors and without adding the y_groups include.

Secondly I keep getting this error in the server_logs but it seems to work fine In-game.


pawn Code:
*** YSI Error: No YSI classes found
  Reply With Quote
Old 03/07/2012, 12:11 PM   #63
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629
Posts: 16,145
Reputation: 2288
Default Re: How to use y_classes for MUCH better class selection.

Chris.: Thanks, I'll fix that.

Akmet: I wouldn't do it that way, just use y_groups in your mode to set mass permissions.

Nicholas.: I'm not sure, I'd have to look in to that as y_classes was designed to work without y_groups.
__________________
Y_Less is offline   Reply With Quote
Old 03/07/2012, 03:07 PM   #64
Nicholas.
Guest
 
Posts: n/a
Default Re: How to use y_classes for MUCH better class selection.

Alright, sounds good.
  Reply With Quote
Old 06/07/2012, 02:59 PM   #65
sgtjones12
Big Clucker
 
sgtjones12's Avatar
 
Join Date: Apr 2012
Posts: 112
Reputation: 10
Default Re: How to use y_classes for MUCH better class selection.

Nice i love it!
sgtjones12 is offline   Reply With Quote
Old 24/07/2012, 07:17 AM   #66
Splav
Big Clucker
 
Join Date: Jan 2011
Posts: 108
Reputation: 2
Default Re: How to use y_classes for MUCH better class selection.

I started use this include. Crashdetect writes in LOG:

Quote:
[10:41:56] [debug] Accessing element at negative index -1
[10:41:56] [debug] AMX backtrace:
[10:41:56] [debug] #0 000ad350 in ?? () from REANIMATOR-TDM.amx
[10:41:56] [debug] #1 0008b074 in public _Class_OtherRequestClass () from REANIMATOR-TDM.amx
[10:41:56] [debug] #2 0008b840 in public OnPlayerRequestClass () from REANIMATOR-TDM.amx
[10:41:56] [debug] Run time error 4: "Array index out of bounds"
[10:41:56] [debug] Accessing element at negative index -1
[10:41:56] [debug] AMX backtrace:
[10:41:56] [debug] #0 000ac4dc in public S@@_OnPlayerSpawn () from REANIMATOR-TDM.amx
[10:41:56] [debug] #1 00080720 in public OnPlayerSpawn () from REANIMATOR-TDM.amx
What is it?
__________________
:

1. - R3 [SQLite]
2. - R2 [MySQL]
3. GeoIP Include R1
Splav is offline   Reply With Quote
Old 26/07/2012, 12:57 AM   #67
[GF]Logic
Gangsta
 
[GF]Logic's Avatar
 
Join Date: Feb 2012
Posts: 517
Reputation: 27
Default Re: How to use y_classes for MUCH better class selection.

i guess Y_Less should take some rest from pawn and let other's try to do something good job =))
__________________
Quote:
If you won't Respect my Religion I won't respect your's
[GF]Logic is offline   Reply With Quote
Old 23/09/2012, 01:08 PM   #68
Extasy4
Little Clucker
 
Join Date: Aug 2012
Posts: 33
Reputation: 0
Default Re: How to use y_classes for MUCH better class selection.

With this inc can I skip class selection? I mean not entering the spectating mode, than return to the class sel, but spawns the player. I hope you understand
Extasy4 is offline   Reply With Quote
Old 23/09/2012, 05:06 PM   #69
Glint
Guest
 
Posts: n/a
Default Re: How to use y_classes for MUCH better class selection.

Quote:
Originally Posted by Extasy4 View Post
With this inc can I skip class selection? I mean not entering the spectating mode, than return to the class sel, but spawns the player. I hope you understand
You can already do that under OnPlayerRequestClass you can SetSpawnInfo and then SpawnPlayer
  Reply With Quote
Old 05/11/2012, 06:38 PM   #70
WiredGuyX
Little Clucker
 
Join Date: Mar 2012
Posts: 32
Reputation: 0
Default Re: How to use y_classes for MUCH better class selection.

Here's a problem with y_class
I'm allowed only to select the first skin. I tried to find a solution in YSI_ClassMenu, but I've had problems also whit that gm.
Code:
public OnGameModeInit()
{	
	printf("%d", Class_Add(281, 1479.468261, -1615.659057, 13.039297, 358.854492, WEAPON_MP5, 500, WEAPON_ARMOUR, 50));
	printf("%d", Class_Add(283, 1479.468261, -1615.659057, 13.039297, 358.854492, WEAPON_MP5, 500, WEAPON_ARMOUR, 50));
printf("%d", Class_Add(284, 1479.468261, -1615.659057, 13.039297, 358.854492, WEAPON_MP5, 500, WEAPON_ARMOUR, 50));
printf("%d", Class_Add(285, 1479.468261, -1615.659057, 13.039297, 358.854492, WEAPON_MP5, 500, WEAPON_ARMOUR, 50));
printf("%d", Class_Add(286, 1479.468261, -1615.659057, 13.039297, 358.854492, WEAPON_MP5, 500, WEAPON_ARMOUR, 50));

    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerInterior(playerid,0);
	SetPlayerFacingAngle(playerid, 0);
	SetPlayerPos(playerid,1479.468261, -1615.659057, 13.039297);
	SetPlayerCameraPos(playerid,1479.3927,-1607.9320,14.0393);
	SetPlayerCameraLookAt(playerid,1479.468261, -1615.659057, 13.039297);
    return 1;
}
Thanks in advice for answers.

EDIT: I've compiled YSI_EG_classes with the last YSI version... again stuck on first class. Arrows for class selection don't work.

Last edited by WiredGuyX; 06/11/2012 at 07:57 PM.
WiredGuyX 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 With class selection Compton Help Archive 35 13/03/2011 03:01 PM
Class selection bug? Cameltoe Help Archive 13 21/10/2010 04:47 PM
help me with Class Selection Showing the class name The_Cobra Help Archive 2 05/02/2010 06:22 PM
[Help] Class Selection Benne Help Archive 1 10/11/2009 09:07 PM


All times are GMT. The time now is 09:08 AM.


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