25.06.2012, 07:57
pawn Code:
if(!strcmp("/hair", cmd, true))
{
if(!IsPlayerInRangeOfPoint(playerid, 5, 412.1661,-53.9825,1001.8984)) return SendClientMessage(playerid, 0xFFFFFF, "ERROR: You're not in range."); // Range Check
new skin = GetPlayerSkin(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2 /removemyhair to remove");
TextDrawSetString(MsgBox," Hair obtained");
TextDrawShowForPlayer(playerid, MsgBox);
SetTimerEx("Hide", 1500, false, "d", playerid);//19077 18975
switch(strval(tmp))
{
case 1: SetPlayerAttachedObject(playerid, GetSlot(playerid), 19077, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
case 2: SetPlayerAttachedObject(playerid, GetSlot(playerid), 18975, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
default: SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2");
}
return 1;
}