Advertisement
Guest User

Untitled

a guest
Aug 12th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. CMD:clothes(playerid,params[])
  2. {
  3. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  4. if(IsAtClothShop(playerid))
  5. {
  6. if(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pLeader] == 0)
  7. {
  8. if(IsPlayerConnected(playerid))
  9. {
  10. if(GetPlayerCash(playerid) < 1500) return SCM(playerid,COLOR_WHITE,"{FFB870}You do not have enough money($1,500).");
  11. SBizzInfo[9][sbTill] += 1500;
  12. SBizzInfo[9][sbProducts]--;
  13. GivePlayerCash(playerid,-1500);
  14. new rand2 = random(5);
  15. SetPlayerVirtualWorld(playerid,rand2);
  16. SetPlayerInterior(playerid,0);
  17. new rand = random(sizeof(gInviteSpawns));
  18. SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
  19. SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
  20. SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  21. SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  22. TogglePlayerControllable(playerid, 0);
  23. SelectChar[playerid] = 255;
  24. SelectCharID[playerid] = PlayerInfo[playerid][pMember];
  25. SelectCharPlace[playerid] = 1;
  26. PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
  27. ShowPlayerDialog(playerid, DIALOG_CLOTHES, DIALOG_STYLE_MSGBOX,"Clothes:", "Press 'Next' to select the clothes.\nPress 'Done' once you have chosen the clothes.","Next", "Done");
  28. new sendername[25],string[100];
  29. GetPlayerName(playerid,sendername,sizeof(sendername));
  30. format(string, sizeof(string), "UPDATE users SET Money='%d' WHERE name='%s'", GetPlayerCash(playerid), sendername);
  31. mysql_query(SQL,string);
  32. format(string,sizeof(string),"UPDATE `sbizz` SET `Till`='%d',`Products`='%d' WHERE `ID`='9'",SBizzInfo[9][sbTill],SBizzInfo[9][sbProducts]);
  33. mysql_query(SQL,string);
  34. }
  35. }
  36. }
  37. else
  38. {
  39. SCM(playerid,COLOR_WHITE,"{FFB870}You're not the clothing store.");
  40. }
  41. return 1;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement