HELP! - 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! (
/showthread.php?tid=272547)
HELP! -
Chrillzen - 28.07.2011
Hi i know there's a getplayervehicleID but is there a getplayerskinID or something like it?
I want to lock a skin to a certain name, but i only know how to do it for a vehicle.
My code.
Код:
new Playername[24];
GetPlayerName(playerid, Playername, sizeof(Playername));
if(newstate == PLAYER_STATE_DRIVER)
{
new Vehicle = GetPlayerVehicleID(playerid);
Код:
Chrillzen2 = AddStaticVehicleEx(482,1879.5073,-2000.0099,13.6774,179.4263,0,0, 9999999999999); // Chrillz car
Код:
if(Vehicle == Chrillzen2) // vehicle id
{
if(strcmp(Playername,"[LK]Chrillzen",true)) // player name
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "This is Chrillzen's private vehicle!");
}
}
Re: HELP! -
fie - 28.07.2011
I though there was a GetPlayerSkin
Does that not work?
Re: HELP! -
Amit_B - 28.07.2011
OnPlayerRequestSpawn ->
pawn Код:
new Playername[24];
GetPlayerName(playerid, Playername, sizeof(Playername));
if(GetPlayerSkin(playerid) == PRIVATESKINID && strcmp(Playername,"[LK]Chrillzen",true))
{
SendClientMessage(playerid,0xff0000ff,"This skin is private.");
return 0;
}
Just replace the PRIVATESKINID to the ID of your skin.
Re: HELP! -
Chrillzen - 28.07.2011
Thanks, but how do i do it for several skins? Or several players?