SA-MP Forums Archive
Disable F4 (Skin 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Disable F4 (Skin selection) (/showthread.php?tid=76416)



Disable F4 (Skin selection) - Trooper[Y] - 04.05.2009

How can i make the user impossible to change Teams/Skins ?
Whats about checking, if player already connected and then on
Code:
OnPlayerRequestClass
do something make it impossible to select....

Or can i detect people, who try to change sites/skin ?

Sincereasly,
Trooper


Re: Disable F4 (Skin selection) - HB - 04.05.2009

Quote:
Originally Posted by Trooper[Y
]
How can i make the user impossible to change Teams/Skins ?
Whats about checking, if player already connected and then on
Code:
OnPlayerRequestClass
do something make it impossible to select....

Or can i detect people, who try to change sites/skin ?

Sincereasly,
Trooper
Spawn the player when accesing OnPlayerRequestClass, but you have to watch out if then he doesn't crash since he didn't choose any skin. Saving the skin on the death is a solution for that.


Re: Disable F4 (Skin selection) - OmeRinG - 04.05.2009

SpawnPlayer(playerid); will call OnPlayerSpawn and respawn the player by his AddPlayerClass cordinates.
try using it


Re: Disable F4 (Skin selection) - Trooper[Y] - 04.05.2009

But i don`t want to make the player possible to get the Team from beginning....
You know, for example, you enter.
After a time you change your skin.
What can i do to prevent you from taking 1st skin ?!
I don`t want to give the player the possibility to get the skin on connect...


Re: Disable F4 (Skin selection) - HB - 04.05.2009

Quote:
Originally Posted by Trooper[Y
]
But i don`t want to make the player possible to get the Team from beginning....
You know, for example, you enter.
After a time you change your skin.
What can i do to prevent you from taking 1st skin ?!
I don`t want to give the player the possibility to get the skin on connect...
You're asking 2 different things now.

1. You want that no-one can take the 1st skin.
2. You don't want that players can choose a new skin with F4.

Which one of those will it be?


Re: Disable F4 (Skin selection) - Redirect Left - 04.05.2009

pawn Code:
new ChosenSkin[playerid]

Under OnPlayerRequestClass

if(ChosenSkin[playerid] == 1)
return SpawnPlayer(playerid);

Under OnPlayerSpawn

ChosenSkin[playerid] = 1;

Under OnPlayerConnect

ChosenSkin[playerid] = 0;

That means when they first connect, they can chose skin, but after they've spawned, cannot. Not tested.