Posts: 607
Threads: 41
Joined: Apr 2009
Yeah i wana do it to i know its somthing with teams..
Posts: 734
Threads: 8
Joined: Jun 2009
i had this before on my server.. you will have to make a #define for example #define TEAM_TRIAD 294 //this number is the skin ID
under OnPlayerSpawn:
pawn Код:
if((GetPlayerSkin(playerid) == TEAM_TRIAD))
{
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name,"Death_Angel",true) == 0) // change this to the name you want
{
}
else
{
GameTextForPlayer(playerid,"~r~This Skin Is For~n~TRIAD'S~n~Only !",700,1); // change this too...
ForceClassSelection(playerid);
SetPlayerHealth(playerid,0.0);
}
return 1;
}
Posts: 145
Threads: 25
Joined: Sep 2009
Reputation:
0
i wanna know same thing but only that you need a high score to choose that skin?
Posts: 734
Threads: 8
Joined: Jun 2009
Quote:
Originally Posted by tiwk
Quote:
Originally Posted by Virtual1ty
i had this before on my server.. you will have to make a #define for example #define TEAM_TRIAD 294 //this number is the skin ID
under OnPlayerSpawn:
pawn Код:
if((GetPlayerSkin(playerid) == TEAM_TRIAD)) { GetPlayerName(playerid, name, sizeof(name)); if(strcmp(name,"Death_Angel",true) == 0) // change this to the name you want { } else { GameTextForPlayer(playerid,"~r~This Skin Is For~n~TRIAD'S~n~Only !",700,1); // change this too... ForceClassSelection(playerid); SetPlayerHealth(playerid,0.0); } return 1; }
|
Ty one problem
1091) : error 017: undefined symbol "name"
1091) : error 017: undefined symbol "name"
1091) : error 029: invalid expression, assumed zero
1091) : fatal error 107: too many error messages on one line
|
very, very strange .. try adding
pawn Код:
new name[MAX_PLAYER_NAME];
somewhere under OnPlayerSpawn
Posts: 188
Threads: 61
Joined: Nov 2012
public OnPlayerRequestSpawn(playerid)
{
new skin = GetPlayerSkin(playerid);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if((skin == 240) && (strcmp(name, "NAME FOR DUDE", true) == 1))
{
SendClientMessage(playerid,COLOR_RED,"This Skin Is Locked For Fool........");
SetPlayerHealth(playerid,0);
return 0;
}
Try this anyways