This topic has been [SOLVED]
#7

Quote:
Originally Posted by juice.j
Alright,

you can pretty much use the example as it is, however you change this line here:

Код:
if(classid == 3 && !IsPlayerAdmin(playerid))
to the classid you actually want to have only reserved for yourself, let's say it's the 5th, and the second clause to comparing your name:

Код:
new cmpstr[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(classid == 5 && strcmp(name,"Jay",false))    //classid == 5 as you want to reserve the fifth classid
The whole code then would look like:

Код:
public OnPlayerRequestClass(playerid,classid)
{
  new cmpstr[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  if(classid == 5 && strcmp(name,"Jay",false))
  {
    SendClientMessage(playerid,COLOR_GREEN,"This skin is only for admins!");
    return 0;
  }
  return 1;
}
Okay, I will give this a try and thanks for the short tut.

Then are tell you if it complied succesfully.
Reply


Messages In This Thread
This topic has been [SOLVED] - by Jay. - 13.05.2010, 17:13
Re: How to lock a skin for a certain "Playername" - by juice.j - 13.05.2010, 17:16
Re: How to lock a skin for a certain "Playername" - by Killa_ - 13.05.2010, 17:20
Re: How to lock a skin for a certain "Playername" - by Jay. - 13.05.2010, 17:21
Re: How to lock a skin for a certain "Playername" - by Jay. - 13.05.2010, 17:25
Re: How to lock a skin for a certain "Playername" - by juice.j - 13.05.2010, 17:26
Re: How to lock a skin for a certain "Playername" - by Jay. - 13.05.2010, 17:27
Re: How to lock a skin for a certain "Playername" - by juice.j - 13.05.2010, 17:28
Re: How to lock a skin for a certain "Playername" - by Jay. - 13.05.2010, 17:36
Re: How to lock a skin for a certain "Playername" - by Jay. - 13.05.2010, 17:42

Forum Jump:


Users browsing this thread: 1 Guest(s)