*HELP*How I can add player class
#1

Hello !!

I wanna spawned some players is same place

but I dont know ID class I read that : https://sampwiki.blast.hk/wiki/AddPlayerClass

and I dont understand please Explain to me
Reply
#2

If you don't know the skin id's, than check out: https://sampwiki.blast.hk/wiki/Skins


AddPlayerClass( SkinID, X, Y, Z, A, WeaponID1, AMMO1, WEaponID2, AMMO2, WeaponID3, AMMO3);
AddPlayerClass( SkinID, X, Y, Z, A, WeaponID1, AMMO1, WEaponID2, AMMO2, WeaponID3, AMMO3);
AddPlayerClass( SkinID, X, Y, Z, A, WeaponID1, AMMO1, WEaponID2, AMMO2, WeaponID3, AMMO3);

Change the values to your own, Hopes it help.
Reply
#3

not ID skins I want ID class where players spawned
Reply
#4

Quote:
Originally Posted by waim
not ID skins I want ID class where players spawned
Just fill into X,Y,Z,A with is positions. A is camera Angel.
Reply
#5

Код:
public OnPlayerRequestClass(playerid,classid)
{
  if(classid == 3 && !IsPlayerAdmin(playerid))
  {
    SendClientMessage(playerid,COLOR_GREEN,"This skin is only for admins!");
    return 0;
  }
  return 1;
}
playerid ID of the player who entered class selection.

classid The ID of the current class being viewed, classids are assigned when AddPlayerClasshttps://sampwiki.blast.hk/wiki/AddPlayerClass is used, and is also returned by it.

me I need Classid the ID
Reply
#6

Help
Reply
#7

This will be a test class. Place it under the OnGameModeInIt function.

AddPlayerClass(265,1630.6813,-2259.4365,13.4938,342.5303,27,500,0,0,0,0); //

You spawn as Officer Tenpenny with a Combat Shotgun holding 500 bullets at the Los Santos Airport. It's really simple to do.

"265" is the Skin ID. Search for them on SA-MP wikipedia.

"1630.6813,-2259.4365,13.4938,342.5303," is the X,Y,Z, and Angle. Do /save in game and look in your "savedpositions.txt" file for the positions.


"27,500" is weapon 1, and the ammo that was assigned to the player. Look on SA-MP wikipedia for a list of weapon ID's.

AddPlayerClass(Skin ID,X,Y,Z,Angle,Weapon 1,Ammo 1,Weapon 2,Ammo 2,Weapon 3,Ammo 3); //

It's really easy... Hope this helped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)