Clothes help..
#1

Well.. I need help with that issue..
When player enters a clothes and stand on the icon and type /buyclothes
i want it to look like OnPlayerRequestSpawn
anyway.. I really dont know how to make it..
I already have the GF command.. but still cant figure it out how to make it..

I got those:

pawn Код:
new Peds[206][1] = {
{264},
{247},//CIVILIANS DOWN HERE
{248},{100},{256},{263},{262},{261},{260},{259},{258},{257},
{256},{255},{253},{252},{251},{249},{246},{245},{244},{243},
{242},{241},{240},{239},{238},{237},{236},{235},{234},{233},
{232},{231},{230},{229},{226},{225},{173},{174},{175},{224},
{223},{222},{221},{220},{219},{218},{217},{216},{215},{214},
{213},{212},{211},{210},{209},{207},{206},{205},{204},{203},
{202},{201},{200},{199},{198},{197},{196},{195},{194},{193},
{192},{191},{190},{189},{185},{184},{183},{182},{181},{180},
{179},{178},{176},{172},{170},{168},{167},{162},{161},{160},
{159},{158},{157},{156},{155},{154},{153},{152},{151},{146},
{145},{144},{143},{142},{141},{140},{139},{138},{137},{136},
{135},{134},{133},{132},{131},{130},{129},{128},{254},{99},
{97},{96},{95},{94},{92},{90},{89},{88},{87},{85},
{84},{83},{82},{81},{80},{79},{78},{77},{76},{75},
{73},{72},{69},{68},{67},{66},{64},{63},{62},{58},
{57},{56},{55},{54},{53},{52},{51},{50},{49},{45},
{44},{43},{41},{39},{38},{37},{36},{35},{34},{33},
{32},{31},{30},{29},{28},{27},{26},{25},{24},{23},
{22},{21},{20},{19},{18},{17},{16},{15},{14},{13},
{12},{11},{10},{1},{2},{290},{291},{292},{293},{187},
{296},{297},{298},{299}
};
pawn Код:
if(strcmp(cmd, "/clothess", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
                if(IsAtClothShop(playerid))
                {
                    GetPlayerPos(playerid, ChangePos[playerid][0],ChangePos[playerid][1],ChangePos[playerid][2]);
                    ChangePos2[playerid][0] = GetPlayerInterior(playerid);
                    ChangePos2[playerid][1] = 1;
                    SetPlayerInterior(playerid,0);
                    new rand = random(sizeof(gInviteSpawns));
                    SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
                    SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
                    SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                    SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
                    TogglePlayerControllable(playerid, 0);
                    SelectChar[playerid] = 255;
                    SelectCharID[playerid] = PlayerInfo[playerid][pMember];
                    SelectCharPlace[playerid] = 1;
                    PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
                    PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
                    SendClientMessage(playerid, COLOR_LIGHTRED, "* Use 'next' to Select the char you want to use.");
                    SendClientMessage(playerid, COLOR_LIGHTRED, "* If you've found the Char you want to use, type 'done'.");
                }
        }
        return 1;
    }

1. i dont like this style.. but..
2. when you do next it dont move..
3. when you done its return to CJ skin..
4. i really about to blow up about that thing.. i'm trying to figure it out for few good hours!

PLEASE ANYONE HELP ME!!
Reply
#2

You're using the original The Godfather?
Reply
#3

Yes I am.. I'm learning to script by remake the script
Reply
#4

pawn Код:
if(strcmp(cmd, "/buyclothes", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsAtClothShop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_CREAM,"USAGE: /buyclothes [Skin ID]");
                    return 1;
                }
                new level = strval(tmp);
                SendClientMessage(playerid, COLOR_GROVE, "You bought clothes for $500.");
                SafeGivePlayerMoney(playerid, -500);
                if(!IsValidSkin(level))
                return SendClientMessage(playerid, COLOR_CREAM, "Wrong skin ID");
                PlayerInfo[playerid][pModel] = level;
                SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
            }
        }
        return 1;
    }
Reply
#5

Need defined of IsValidSkin please?

btw.. I still need to block few skins ids...
I dont want everyone will be able to pick whatever they want..

I mean.. factions ids.. they will be able to choose.. and i dont want it..

btw.. I tried to make it with a dialog but the skin isnt saved...

anyway.. more?
Reply
#6

pawn Код:
forward IsValidSkin(skinid);

public IsValidSkin(skinid)
{
    #define MAX_BAD_SKINS 22
    new badSkins[MAX_BAD_SKINS] =
    { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289 };
    if (skinid < 0 || skinid > 299) return false;
    for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; }
    #undef MAX_BAD_SKINS
    return 1;
}
Reply
#7

Already ******d it
but thanks a lot man!
its working

and btw.. I can just put the clothes I want right? if i dont want them to choose faction clothes so not to put them
am i right?
and thanks..
Reply
#8

the bad clothes are the not allowed clothes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)