Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:clothes(playerid,params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
- if(IsAtClothShop(playerid))
- {
- if(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pLeader] == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(GetPlayerCash(playerid) < 1500) return SCM(playerid,COLOR_WHITE,"{FFB870}You do not have enough money($1,500).");
- SBizzInfo[9][sbTill] += 1500;
- SBizzInfo[9][sbProducts]--;
- GivePlayerCash(playerid,-1500);
- new rand2 = random(5);
- SetPlayerVirtualWorld(playerid,rand2);
- 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][pChar] = ChosenSkin[playerid];
- ShowPlayerDialog(playerid, DIALOG_CLOTHES, DIALOG_STYLE_MSGBOX,"Clothes:", "Press 'Next' to select the clothes.\nPress 'Done' once you have chosen the clothes.","Next", "Done");
- new sendername[25],string[100];
- GetPlayerName(playerid,sendername,sizeof(sendername));
- format(string, sizeof(string), "UPDATE users SET Money='%d' WHERE name='%s'", GetPlayerCash(playerid), sendername);
- mysql_query(SQL,string);
- format(string,sizeof(string),"UPDATE `sbizz` SET `Till`='%d',`Products`='%d' WHERE `ID`='9'",SBizzInfo[9][sbTill],SBizzInfo[9][sbProducts]);
- mysql_query(SQL,string);
- }
- }
- }
- else
- {
- SCM(playerid,COLOR_WHITE,"{FFB870}You're not the clothing store.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement