SA-MP Forums Archive
Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - 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)
+--- Thread: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. (/showthread.php?tid=413862)



Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - Scrillex - 07.02.2013

So the thing is:

When player spawns it shows the text in middle Hood Rat even if it Grove Street Crips gang. Maybe someone knows how to fix that.

For example:
pawn Code:
case 0..3:
        {
            Group_SetPlayer(gHoodRats, playerid, true);
            GameTextForPlayer(playerid,"~w~Hood Rats",3000,5); // This will show up an Text , when you select your class
            SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
            SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
            SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
            SetPlayerFacingAngle(playerid,122.4500);
            SetPlayerColor(playerid,0xA000FFFF); // Teamcolor
        }
        case 4..7:
        {
            Group_SetPlayer(gGSF, playerid, true);
            GameTextForPlayer(playerid,"~w~Grove Street Crips",3000,5);
            SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
            SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
            SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
            SetPlayerFacingAngle(playerid,252.4717);
            SetPlayerColor(playerid,0x55FF00FF);
        }
(+ big thanks to ****** for explaining how y_commands works with y_groups works as charm)

Thank you for your time.

And wish you a good day. With Respect Scrillex.


Re: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - Scrillex - 07.02.2013

pawn Code:
switch(classid)
    {
        case 0..3:
        {
            Group_SetPlayer(gHoodRats, playerid, true);
            GameTextForPlayer(playerid,"~w~Hood Rats",3000,5); // This will show up an Text , when you select your class
            SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
            SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
            SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
            SetPlayerFacingAngle(playerid,122.4500);
            SetPlayerColor(playerid,0xA000FFFF); // Teamcolor
        }
        case 4..7:
        {
            Group_SetPlayer(gGSF, playerid, true);
            GameTextForPlayer(playerid,"~w~Grove Street Crips",3000,5);
            SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
            SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
            SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
            SetPlayerFacingAngle(playerid,252.4717);
            SetPlayerColor(playerid,0x55FF00FF);
        }
It's just the thing.. Switch(classid) I think thats why something is not working correctly..


Re: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - LarzI - 07.02.2013

Try using a TextDraw instead.
Quote:
Originally Posted by SA-MP Wiki/GameTextStyle
Style 5

Displays for 3 seconds, regardless of what time you set. Will refuse to be shown if it is 'spammed'.



Re: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - Scrillex - 07.02.2013

Okay LarzI I will try.. But the thing is.. Now what I have experienced with y_commands..

So the thing is I want to set it gGSF but it works with several another groups too..... How can I do it only for one gGroup.

Yesterday I was all night up to trying to figure it out..

pawn Code:
GROUP_ADD<gGSF>
    {
        @YCMD:kill;
    }
YCMD:kill(playerid, params[], help)
{
    SetPlayerHealth(playerid, 0.0);
    return 1;
}



Re: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - LarzI - 07.02.2013

If that fails to work, try removing the GROUP_ADD and use the functions instead
pawn Code:
Group_SetGlobalCommand(kill, false);
    Group_SetCommand(gGSF, kill, true);



Re: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - Scrillex - 07.02.2013

Okay that worked kinda...

You see when I'am in Group gSBF and I write /kill it shows uknown command but still he dies..

What could be wrong?

°But for gGSF it worked fine thanks LarzI


Re: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - Scrillex - 07.02.2013

Now there is a problem.. It show on all groups.. Uknown Command but command still works!


Re: Y_groups, y_classes OnPlayerSpawn it shows last gangs name.. - Scrillex - 07.02.2013

Okay thanks.. I will wait for response.. Man you are cool.. Just helped a lot... If it will not be much trouble for you.. Maybe you can pm me or something.. Or write in this topic how it is BIG thanks man for it