SA-MP Forums Archive
CJ Skin? - 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: CJ Skin? (/showthread.php?tid=476097)



CJ Skin? - [WA]iRonan - 16.11.2013

I got in trouble with my gamemode.

The problem: my class selection only shows the CJ Skin and dosn't show the skins I picked.
The code from the classes:
Код:
    AddPlayerClass(284,1481.9659,-1769.9287,18.7958,3.8241,0,0,0,0,0,0); // Government spawn
    AddPlayerClass(106,2512.0620,-1671.8545,13.4788,82.4462,0,0,0,0,0,0); // Grove St. Spawn
    AddPlayerClass(110,2650.6995,-2021.7021,14.1766,97.0868,0,0,0,0,0,0); // Vagos spawn
    AddPlayerClass(102,2217.3718,-1155.5084,25.7266,174.4780,0,0,0,0,0,0); // Ballas Spawn
Only the CJ skins shows up and I haven't even added this skin.
I am giving the player weapons when he spawns:
Код:
	GivePlayerWeapon(playerid, 24, 	250);
	GivePlayerWeapon(playerid, 25, 	250);
	GivePlayerWeapon(playerid, 31, 	2500);
	GivePlayerWeapon(playerid, 33, 	50);
	GivePlayerWeapon(playerid, 17, 	5);
	GivePlayerWeapon(playerid, 4, 	1);
Could this be the problem?

Regards, iRonan.


Re: CJ Skin? - FShiwani - 16.11.2013

Quote:
Originally Posted by [WA]iRonan
Посмотреть сообщение
I got in trouble with my gamemode.

The problem: my class selection only shows the CJ Skin and dosn't show the skins I picked.
The code from the classes:
Код:
    AddPlayerClass(284,1481.9659,-1769.9287,18.7958,3.8241,0,0,0,0,0,0); // Government spawn
    AddPlayerClass(106,2512.0620,-1671.8545,13.4788,82.4462,0,0,0,0,0,0); // Grove St. Spawn
    AddPlayerClass(110,2650.6995,-2021.7021,14.1766,97.0868,0,0,0,0,0,0); // Vagos spawn
    AddPlayerClass(102,2217.3718,-1155.5084,25.7266,174.4780,0,0,0,0,0,0); // Ballas Spawn
Only the CJ skins shows up and I haven't even added this skin.
I am giving the player weapons when he spawns:
Код:
	GivePlayerWeapon(playerid, 24, 	250);
	GivePlayerWeapon(playerid, 25, 	250);
	GivePlayerWeapon(playerid, 31, 	2500);
	GivePlayerWeapon(playerid, 33, 	50);
	GivePlayerWeapon(playerid, 17, 	5);
	GivePlayerWeapon(playerid, 4, 	1);
Could this be the problem?

Regards, iRonan.
What callback are you placing these under?


Re: CJ Skin? - [WA]iRonan - 16.11.2013

Quote:
Originally Posted by FShiwani
Посмотреть сообщение
What callback are you placing these under?
AddPlayerClass: OnGamemodeInit
GivePlayerWeapon: OnPlayerSpawn


Re: CJ Skin? - [WA]iRonan - 16.11.2013

Bump already


AW: CJ Skin? - Skimmer - 16.11.2013

Can you show us the whole code on OnGameModeInit()


Re: AW: CJ Skin? - [WA]iRonan - 16.11.2013

Quote:
Originally Posted by Skimmer
Посмотреть сообщение
Can you show us the whole code on OnGameModeInit()
I can't right now but I'm able to give it tomorrow.


Re: CJ Skin? - [WA]iRonan - 17.11.2013

Код:
public OnGameModeInit()
{
    SetTimer("Cycle1", 1000,true);//1sec
    new p = GetMaxPlayers();
    for (new i=0; i < p; i++) {
	    SetPVarInt(i, "laser", 0);
	    SetPVarInt(i, "color", 18643);
    }
	SetTimer("SendMSG", 300000, true);
	SetGameModeText("LSDM [0.1]");
        AddPlayerClass(284,1481.9659,-1769.9287,18.7958,3.8241,0,0,0,0,0,0); // Government spawn
	AddPlayerClass(106,2512.0620,-1671.8545,13.4788,82.4462,0,0,0,0,0,0); // Grove St. Spawn
	AddPlayerClass(110,2650.6995,-2021.7021,14.1766,97.0868,0,0,0,0,0,0); // Vagos spawn
	AddPlayerClass(102,2217.3718,-1155.5084,25.7266,174.4780,0,0,0,0,0,0); // Ballas Spawn
	return 1;
}



Re: CJ Skin? - Biess - 17.11.2013

Use
pawn Код:
SetPlayerSkin(playerid, skinid);



Re: CJ Skin? - [WA]iRonan - 17.11.2013

Quote:
Originally Posted by Biess
Посмотреть сообщение
Use
pawn Код:
SetPlayerSkin(playerid, skinid);
I don't think that will fix it because I can't even spawn :/