SA-MP Forums Archive
*HELP*How I can add player class - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: *HELP*How I can add player class (/showthread.php?tid=112462)



*HELP*How I can add player class - waim - 07.12.2009

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


Re: *HELP*How I can add player class - Goobiiify - 07.12.2009

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.



Re: *HELP*How I can add player class - waim - 07.12.2009

not ID skins I want ID class where players spawned


Re: *HELP*How I can add player class - Goobiiify - 07.12.2009

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.


Re: *HELP*How I can add player class - waim - 07.12.2009

Код:
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


Re: *HELP*How I can add player class - waim - 08.12.2009

Help


Re: *HELP*How I can add player class - Emmet_ - 08.12.2009

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.