16.03.2009, 07:15
Im using PEN1LS Gangs Edition, i tried to make a clan but i failed on the last 2 steps... i need help pls.
I wanna delet BALLAS and put UNIQUE.
Clan name: uNiQue Freestyle
Clan TAG: [uNiQue]
Can someone do it for me... i will be really greatful.
download the GM here: REMOVED
This is the tutorial, but i cant do it anyway
.
_________________________________________________
Disclaimer: this is MY way of doing it. I'm sure plenty of people out there have other ways, maybe BETTER ways, but this is what I use and it works, like it or not, its what you get.
So, first of all search for public OnPlayerRequestClass in your script. This is the part where, once ingame, when a player is looking at a specific skin, it will tell him for example: BALLAS - Objective: CHAOS.
Directly under OnPlayerRequestClass, put this:
Let's start here, by searching for the clan tag in the user's nickname, and showing the appropriate gametext if they have the tag or not. Below is an example of that using the tag: [M2S] with the skin IDs: 49 through 52.
So, under OnPlayerRequestClass still, find the last "else if" defining class ID (skin IDs), and below it add this:
What this does is what I said above, it searches in the player's nickname for the tag [M2S], if they have it, it will show the gametext M2S CLAN: Objective: CHAOS, if they dont, it will show: YOU CANNOT PICK THIS SKIN!!! So far, simple stuff 
Now, its all nice to show gametexts, but right now this doesn't prevent anyone from taking any skin. All it does is show gametext. So, to prevent users from taking your skins, you need to add something like this under the callback OnPlayerSpawn:
This will check if they have [M2S] in their nickname, if they do, Skin Check OK, if they dont, it forces them back to class selection (only once they die, and setting health to zero doesnt work here! You can set a timer to kill them after a few seconds if you need to!) it makes their team: 4 (criminal for pen1 scripts) it sets their skin to skin ID 10 (i think its an old lady), it resets their weapons, and sends them a message to do /kill to change skin.
In my script, M2S skins had their OWN team, team 16. This enables me to be sure that if a player spawns and is part of TEAM 16, they MUST have skin IDs between 49 and 52 (M2S skins). To do this, under the callback SetPlayerTeamFromClass, add something like this:
And you're basically done. Remember this is an EXAMPLE, copying this straight into your script will not do anything but bug everything up, make sure you read this thoroughly and understand everything before you start editing it and adding it to your script.
Good luck!
I wanna delet BALLAS and put UNIQUE.
Clan name: uNiQue Freestyle
Clan TAG: [uNiQue]
Can someone do it for me... i will be really greatful.
download the GM here: REMOVED
This is the tutorial, but i cant do it anyway

_________________________________________________
Locking skins tutorial
Tutorial for locking skins for Public Enemy:Disclaimer: this is MY way of doing it. I'm sure plenty of people out there have other ways, maybe BETTER ways, but this is what I use and it works, like it or not, its what you get.
So, first of all search for public OnPlayerRequestClass in your script. This is the part where, once ingame, when a player is looking at a specific skin, it will tell him for example: BALLAS - Objective: CHAOS.
Directly under OnPlayerRequestClass, put this:
Код:
new player[24]; GetPlayerName(playerid, player, 24);
So, under OnPlayerRequestClass still, find the last "else if" defining class ID (skin IDs), and below it add this:
Код:
else if (classid >= 49 && classid <= 52) { if(strfind(player,"[M2S]",false) != -1) { format(string, sizeof(string), "~g~M2S CLAN~n~~r~Objective~w~: CHAOS"); GameTextForPlayer(playerid,string,3500,4); } else { format(string, sizeof(string), "~r~YOU CANNOT PICK THIS SKIN!!!"); GameTextForPlayer(playerid,string,3500,4); } }

Now, its all nice to show gametexts, but right now this doesn't prevent anyone from taking any skin. All it does is show gametext. So, to prevent users from taking your skins, you need to add something like this under the callback OnPlayerSpawn:
Код:
if(gTeam[playerid] == 16) { if(strfind(player,"[M2S]",true) == 0) { SendClientMessage(playerid,COLOR_ORANGE,"Skin check ok"); } else { ForceClassSelection(playerid); gTeam[playerid] = 4; SetPlayerSkin(playerid,10); ResetPlayerWeapons(playerid); SendClientMessage(playerid,COLOR_ORANGE,"You cannot use this skin! Type /kill now!"); } return 1; }
In my script, M2S skins had their OWN team, team 16. This enables me to be sure that if a player spawns and is part of TEAM 16, they MUST have skin IDs between 49 and 52 (M2S skins). To do this, under the callback SetPlayerTeamFromClass, add something like this:
Код:
else if (classid >= 49 && classid <= 52) { gTeam[playerid] = TEAM_M2S; PlayerInfo[playerid][pTeam] = 16; }
Good luck!