Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. CMD:thachdau(playerid, params[])
  2. {
  3. new string[128], giveplayerid, theloai, price;
  4. if(sscanf(params, "u", giveplayerid, theloai, price)) return SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /thachdau [playerid] [dausung/duaxe] [price]");
  5. if(price < 1001 || price > 100000) return SendClientMessageEx(playerid, COLOR_GREY, "Tien thach dau can phai tren 1.001$ va duoi 100.000$");
  6.  
  7. else if(strcmp(theloai,"dausung",true) == 0)
  8. {
  9. Loimoithachdau[giveplayerid] = playerid;
  10. Giatienthachdau[giveplayerid] = price;
  11. Theloaithachdau[giveplayerid] = 1;
  12. format(string, sizeof(string), "[!] Ban da gui loi moi thach dau dau sung den %s voi gia %s", GetPlayerNameEx(giveplayerid), number_format(price));
  13. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  14. format(string, sizeof(string), "* %s da gui loi moi thach dau dau sung cho ban voi khoan cuoc la %s. Hay nhan '/chapnhan thachdau' de phan hoi lai nhe", number_format(price), GetPlayerNameEx(giveplayerid));
  15. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  16. }
  17. else if(strcmp(theloai,"duaxe",true) == 0)
  18. {
  19. Loimoithachdau[giveplayerid] = playerid;
  20. Giatienthachdau[giveplayerid] = price;
  21. Theloaithachdau[giveplayerid] = 2;
  22. format(string, sizeof(string), "[!] Ban da gui loi moi thach dau dua xe den %s voi gia %s", GetPlayerNameEx(giveplayerid), number_format(price));
  23. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  24. format(string, sizeof(string), "* %s da gui loi moi thach dau dua xe cho ban voi khoan cuoc la %s. Hay nhan '/chapnhan thachdau' de phan hoi lai nhe", number_format(price), GetPlayerNameEx(giveplayerid));
  25. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  26. }
  27. return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement