ZCMD to Normal Command
#11

I just recommend you uzing ZCMD, Since it's faster. You are also making a roleplay server means alot of commands is making your server slow.

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;
}
Place that onder OnPlayerCommand, If you have any errors drop them here.
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: 5 Guest(s)