OnPlayerRequestClass
#1

Hey Guys,

im Getting a Problem.
When a Player come on Team selection it do not show skins available.
Here is my OnPlayerRequestClass:
Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 3142.5554,-1499.8295,32.1060);
	SetPlayerFacingAngle(playerid, 5.1827);
	SetPlayerCameraLookAt(playerid, 3142.5554,-1499.8295,32.1060);
        SetPlayerCameraPos(playerid, 3142.5554,-1499.8295,32.1060);
	switch(classid) // Switching between the classids
    {
         case 0..1/* The first classid is of the cops*/:
         {
              SetPlayerTeam(playerid, Cops); // Setting players team
              GameTextForPlayer(playerid, "~b~Cops", 1000, 3); // Screen msg for player to show what team
         }

         case 2..3/* The second classid is of the criminals*/:
         {
              SetPlayerTeam(playerid, Robbers); // Same as above
              GameTextForPlayer(playerid, "~r~Robbers", 1000, 3); // Same as above
         }
    }
	return 1;
}
i need that it should also show skins available.
Waiting for reply.
Reply
#2

You need to define skins for each team, here is one for cops:

Код:
           { 
              SetPlayerTeam(playerid, Cops); // Setting players team 
              GameTextForPlayer(playerid, "~b~Cops", 1000, 3); // Screen msg for player to show what team 
              AddPlayerClass(280,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(281,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(282,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(283,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(284,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(285,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(286,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(287,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(288,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(289,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
              AddPlayerClass(290,1743.1095,-1860.4247,13.5788,0.0026,0,0,0,0,0,0); 
           }
For the terrorist team am not sure about it, cause you might need different skin ID's.
Reply
#3

You need AddPlayerClass lines under your gamemode, or no skins will be available to you.

https://sampwiki.blast.hk/wiki/AddPlayerClass

If you already have those, try setting the camera pos BEFORE setting the camera lookat pos.
Reply
#4

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
You need AddPlayerClass lines under your gamemode, or no skins will be available to you.

https://sampwiki.blast.hk/wiki/AddPlayerClass

If you already have those, try setting the camera pos BEFORE setting the camera lookat pos.
You think im Noob?
Dude without that there wont be option saying Cop Team or Robber Team.
Reply
#5

Show us your AddPlayerClass,
Are you sure that the Camera is looking at the player ?
pawn Код:
SetPlayerPos(playerid, 3142.5554,-1499.8295,32.1060);
    SetPlayerFacingAngle(playerid, 5.1827);
    SetPlayerCameraLookAt(playerid, 3142.5554,-1499.8295,32.1060);
        SetPlayerCameraPos(playerid, 3142.5554,-1499.8295,32.1060);
Make sure it's in the correct position to view were to character is meant to be.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)