Command /buyclothes problem , I GIVE REP !!! Help pls.
#1

My buyclothes command is :
pawn Код:
CMD:buyclothes(playerid,params[])
{
    if(GetPlayerVirtualWorld(playerid)-BUSINESS_VIRTUAL_WORLD >= 1)
    {
        new businessID;
        businessID = GetPlayerVirtualWorld(playerid) - BUSINESS_VIRTUAL_WORLD;
        if(businessVariables[businessID][bType] == 2)
        {
            new id, skin;
            if(sscanf(params,"i",skin)) return SendClientMessage(playerid, COLOR_GREY,"SYNTAX: /buyclothes [skinid]");
            if(!IsPlayerInRangeOfPoint(playerid, 7.0, 207.7145,-103.5601,1005.2578)) return SendClientMessage(playerid,-1,"You are not at binco");
            if(!IsValidSkin(skin)) return SendClientMessage(playerid,-1,"Please enter a valid skin id.");
            playerVariables[id][pSkin] = skin;
            SetPlayerSkin(id, skin);
            new wakaname[25];
            GetPlayerName(id,wakaname,25);
            new string233[28];
            format(string233,sizeof(string233),"You've bought skin id %d .",skin);
            SendClientMessage(playerid,-1,string233);
            playerVariables[playerid][pMoney] -= 1500;
            businessVariables[businessID][bVault] += 1500;
            }
        }
        return 1;
}
pawn Код:
stock IsValidSkin( skin )
{
    if(skin == 74 || skin > 299 || skin < 0 )
        return 0;

    return 1;
}
and i want that the players who are not in a faction to not buy police skins and civilians have separate skin ids. I want to give them a reply message , like You are not part of LSPD.
Reply


Messages In This Thread
Command /buyclothes problem , I GIVE REP !!! Help pls. - by buburuzu19 - 09.10.2014, 13:03
Re: Command /buyclothes problem , I GIVE REP !!! Help pls. - by YanLanger - 09.10.2014, 13:04
Re: Command /buyclothes problem , I GIVE REP !!! Help pls. - by buburuzu19 - 09.10.2014, 13:09
Re: Command /buyclothes problem , I GIVE REP !!! Help pls. - by DavidBilla - 09.10.2014, 13:41
Re: Command /buyclothes problem , I GIVE REP !!! Help pls. - by buburuzu19 - 09.10.2014, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)