#1

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 Chrillzen2;
Код:
 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!");
    }
   }
Reply
#2

I though there was a GetPlayerSkin
Does that not work?
Reply
#3

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.
Reply
#4

Thanks, but how do i do it for several skins? Or several players?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)