Guest User

Untitled

a guest
Jan 26th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. if(DIALOG_HOUSENAME)
  2. {
  3. if(response)
  4. {
  5. new bouse = PlayerInfo[playerid][pPhousekey],housename[250],string[100],playername[MAX_PLAYER_NAME];
  6. GetPlayerName(playerid, playername, sizeof(playername));
  7. if (PlayerInfo[playerid][pPhousekey] != 999 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  8. {
  9. new maxc = strlen(housename);
  10. new housename[64];
  11. if(maxc > 20) return SCM(playerid,COLOR_DS,"{37B9C8}Maximum caracter is 20.");
  12. new housename2[250];
  13. mysql_real_escape_string(inputtext, housename);
  14. strmid(HouseInfo[bouse][hDiscription], housename, 0, strlen(housename), 64);
  15. format(string, sizeof(string), "House name set to:{B8DBFF} %s",HouseInfo[bouse][hDescription]);
  16. SendClientMessage(playerid, COLOR_DS, string);
  17. new str[256];
  18. format(str,sizeof(str),"UPDATE houses SET Discription='%s' WHERE ID='%d'",HouseInfo[bouse][hDescription],PlayerInfo[playerid][pPhousekey]);
  19. mysql_query(SQL,str);
  20. OnPropTextdrawUpdate(1, bouse);
  21. }
  22. else return SendClientMessage(playerid, COLOR_DS, "{37B9C8}Tu nu detii o casa.");
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment