16.07.2013, 23:47
(
Последний раз редактировалось OTACON; 17.07.2013 в 01:46.
)
[] GetPlayerSex v2
[] Information:
Character sex verify the server.
[] function:
[] example:
[] Credits:
OTACON
RyDeR (suggestion)
__________________________________________________ ______________
[] GetPlayerSkinColour
[] Information:
Check the Character Skin color on the Server.
[] Function:
[] example::
[] Creditos:
OTACON
[] Information:
Character sex verify the server.
[] function:
pawn Код:
native GetPlayerSex(playerid);
pawn Код:
stock GetPlayerSex(playerid) {
switch(GetPlayerSkin(playerid)) { //man
case 0..8,14..30,32..38,42..52,57..62,66..68,70..73,78..84,86,94..128,132..137,142..144: return true;
case 146..147,149,153..156,158..168,170..177,179..189,200,202..204,206,208..209,210,212,213,217: return true;
case 220..223,227..230,234..236,239..242,247..250,252..255,264..297,299,258..262: return true;
} return false;
}
pawn Код:
COMMAND:test(playerid, params[]) {
if(GetPlayerSex(playerid)) { //Man
SendClientMessage(playerid, -1, "[TEST] You Man");
} else { //woman
SendClientMessage(playerid, -1, "[TEST] You woman");
} return true;
}
OTACON
RyDeR (suggestion)
__________________________________________________ ______________
[] GetPlayerSkinColour
[] Information:
Check the Character Skin color on the Server.
[] Function:
pawn Код:
native GetPlayerSkinColour(playerid);
pawn Код:
stock GetPlayerSkinColour(playerid) {
switch(!GetPlayerSkin(playerid)) { //black
case 0,4..22,24,25,28,30,35,36,40,46..48,50,51,54,55,58,63..67,69,74,76,78..80,83,84,86: return true;
case 91,98,102..107,131,134,136,139,140,142..146,149..150,156,163,166,168,176,180,182,183: return true;
case 185,187,190,193,195,207,211,214,215,218..223,230,233,238,239,243..245,249,253,256,260: return true;
case 262,263,265,267,269,270,271,274,275,278,279,284,293,296..298: return true;
} return false;
}
pawn Код:
COMMAND:test(playerid, params[]) {
if(GetPlayerSkinColour(playerid)) { //white
SendClientMessage(playerid, -1, "You white");
} else { //black
SendClientMessage(playerid, -1, "You black");
} return true;
}
OTACON