ZCMD to Normal Command
#13

/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 .
Reply


Messages In This Thread
ZCMD to Normal Command - by CoLLYY - 11.08.2011, 11:29
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 11:31
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 11:33
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 11:35
Re: ZCMD to Normal Command - by TheArcher - 11.08.2011, 11:36
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 11:36
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 11:38
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 11:42
Re: ZCMD to Normal Command - by TheArcher - 11.08.2011, 11:44
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 11:45
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 11:45
Re: ZCMD to Normal Command - by TheArcher - 11.08.2011, 11:50
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 11:51
Re: ZCMD to Normal Command - by TheArcher - 11.08.2011, 11:57
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 12:00
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 12:03
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 12:05
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 12:15
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 12:19
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 12:22
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 12:24
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 12:25
Re: ZCMD to Normal Command - by Darnell - 11.08.2011, 12:28
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 12:35
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 12:44
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 12:45
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 12:54
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 12:57
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 13:07
Re: ZCMD to Normal Command - by Kingunit - 11.08.2011, 13:09
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 13:31
Re: ZCMD to Normal Command - by PhoenixB - 11.08.2011, 14:05
Re: ZCMD to Normal Command - by CoLLYY - 11.08.2011, 16:15

Forum Jump:


Users browsing this thread: 2 Guest(s)