Originally Posted by Darnell
/hat :
pawn Код:
if(strcmp(cmd, "/hat", true) == 0) { new skin, id = strval(params[0]), beret, slot = GetEmptySlot(playerid), count;
if(id <= 0 || id > 12) return SendClientMessage(playerid, 0xFFFFFFAA, "Use: /hat [1 - 12]"); skin = (GetPlayerSkin(playerid) - 1); switch(id) { case 1: beret = 18926; case 2..10: beret = 18926 + id; case 11: beret = 19099; case 12: beret = 19098; } do { if(skin == invalidskins[count]) return SendClientMessage(playerid, 0xFFFFFFAA, "Your skin do not support a cap."); count++; } while(count < sizeof invalidskins); if(skin < 0) skin = 0; if(slot == -1) return SendClientMessage(playerid, 0xFFFFFFAA, "You're holding the maximum of objects possible."); TextDrawSetString(MsgBox[playerid]," You use a Cap"); TextDrawShowForPlayer(playerid, MsgBox[playerid]); SetTimerEx("Hide", 3000, false, "d", playerid); SetPlayerAttachedObjectEx(playerid, slot, beret, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]); GivePlayerMoney(playerid, -500); return 1; }
/backcaps :
pawn Код:
if(strcmp(cmd, "/backcaps", true) == 0) { new skin, id = strval(params[0]), beret, slot = GetEmptySlot(playerid), count;
if(id <= 0 || id > 5) return SendClientMessage(playerid, 0xFFFFFFAA, "Use: /backcaps [1 - 5]"); skin = (GetPlayerSkin(playerid) - 1); switch(id) { case 1: beret = 18939; case 2..5: beret = 18939 + id; } do { if(skin == invalidcapsskins[count]) return SendClientMessage(playerid, 0xFFFFFFAA, "Your skin do not support a cap."); count++; } while(count < sizeof invalidcapsskins); if(skin < 0) skin = 0; if(slot == -1) return SendClientMessage(playerid, 0xFFFFFFAA, "You're holding the maximum of objects possible."); TextDrawSetString(MsgBox[playerid]," You use a Cap"); TextDrawShowForPlayer(playerid, MsgBox[playerid]); SetTimerEx("Hide", 3000, false, "d", playerid); SetPlayerAttachedObjectEx(playerid, slot, beret, 2, SkinCapsSet[skin][0], SkinCapsSet[skin][1], SkinCapsSet[skin][2], SkinCapsSet[skin][3], SkinCapsSet[skin][4], SkinCapsSet[skin][5]); GivePlayerMoney(playerid, -500); return 1; }
/removeob
pawn Код:
if(strcmp(cmd, "/removeob", true) == 0) { if(UseHat(playerid)) { RemovePlayerAttachedObject(playerid, pObject[playerid][oslot]); pObject[playerid][oslot] = -1; pObject[playerid][slotreserved] = false; TextDrawSetString(MsgBox[playerid]," Cap removed"); TextDrawShowForPlayer(playerid, MsgBox[playerid]); SetTimerEx("Hide", 3000, false, "d", playerid); return 1; } return SendClientMessage(playerid, 0xFFFFFFAA, "You aren't using hat/backcaps."); }
/helphat
pawn Код:
if(strcmp(cmd, "/helphat", true) == 0 || { SendClientMessage(playerid, COLOR_GREEN1, "Ulric Hat/BackCaps system by Xaviour212/Dimas_Rizward."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type: /hat [1 - 12] to use a Hat."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type: /backcaps [1 - 5] to use a BackCaps."); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Type: /removeob to removed your hat and backcaps."); return 1; }
I'd be glad if you could click here or here if I helped you .
|