Class Selection - 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: Class Selection (
/showthread.php?tid=574876)
Class Selection -
NeamPojma - 21.05.2015
Im using textdraw based class selection and it work
I pick class e.g. Engineer and i get weapons and everything,but when i died im spawning without weapons
How i can make when you press "Enigneer" it will remember and everytime you respawn you will be "Engineer" untill you want to change class again with /class (well for now i just need something so it will remember which class is choosed)
Here is my code:
http://pastebin.com/NdjK5mrH
Re: Class Selection -
Konstantinos - 21.05.2015
https://sampwiki.blast.hk/wiki/SetSpawnInfo
Since a player can have up to 3 weapons, you can set the weapons in SetSpawnInfo and the weapons will be given upon the spawning.
Re: Class Selection -
NeamPojma - 21.05.2015
Im using more maps and coords are changing,so which coords i will put on (SetSpawnInfo,Float: x,Float:y,Float:z)....After few mins it will be changed depend on map
Im defined
Quote:
enum mInfo
{
mName[32],
mFscriptName[32],
Float:mCTSpawnX,
Float:mCTSpawnY,
Float:mCTSpawnZ,
Float:mTSpawnX,
Float:mTSpawnY,
Float:mTSpawnZ,
}
|
but that dont seems to work if i put mTSpawnZ etc.
Any idea?
Re: Class Selection -
Konstantinos - 21.05.2015
You can set to 0.0 (x, y, z) in the function and normally in OnPlayerSpawn set the correct position.
Re: Class Selection -
NeamPojma - 21.05.2015
Thanks man it worked!