Guest User

Untitled

a guest
Apr 23rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.51 KB | None | 0 0
  1. new Text:houseTD[MAX_PLAYERS];
  2. new TextDrawOn[MAX_PLAYERS];
  3.  
  4. public OnPlayerConnect
  5. {
  6. TextDrawOn[playerid] = 0;
  7. houseTD[playerid] = TextDrawCreate(10.0, 140, "_");
  8. TextDrawColor(houseTD[playerid], 0x00bfffff);
  9. TextDrawUseBox(houseTD[playerid], 1);
  10. TextDrawBoxColor(houseTD[playerid], 0x00000070);
  11. TextDrawSetShadow(houseTD[playerid], 1);
  12. TextDrawSetOutline(houseTD[playerid], 1);
  13. TextDrawBackgroundColor(houseTD[playerid], 0x000000ff);
  14. TextDrawFont(houseTD[playerid], 2);
  15. TextDrawSetProportional(houseTD[playerid], 1);
  16. TextDrawTextSize(houseTD[playerid], 185.0, 280.0);
  17. TextDrawLetterSize(houseTD[playerid], 0.3, 0.7);
  18. TextDrawHideForPlayer(playerid, houseTD[playerid]);
  19. return 1;
  20. }
  21.  
  22.  
  23. public GlobalPlayerTimer
  24. {
  25. if(TextDrawOn[i] > 0)
  26. {
  27.     TextDrawOn[i] -= 1;
  28. }
  29. if(TextDrawOn[i] == 1)
  30. {
  31.     TextDrawHideForPlayer(i, houseTD[i]);
  32. }
  33. TextDrawHideForPlayer(i, houseTD[i]);
  34. return 1;
  35. }
  36.  
  37. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  38. {
  39.     for(new h = 0; h < sizeof(HouseInfo); h++)
  40.     {
  41.         if(checkpointid == houseCP[h])
  42.         {
  43.         if(IsPlayerInAnyVehicle(playerid)) return 1;
  44.         if(TextDrawOn[playerid] == 1)  return 1;
  45.         new strstr[150];
  46.             format(strstr,sizeof(strstr),
  47.         "~g~House is to sell~n~~w~Number: ~g~%d~n~w~Adress: ~g~%s~n~w~Price:~g~%d~g~$%d",
  48.         HouseInfo[h][hAdress],HouseInfo[h][hName],HouseInfo[h][hPrice]);
  49.             TextDrawSetString(houseTD[playerid], strstr);
  50.         TextDrawShowForPlayer(playerid, houseTD[playerid]);
  51.         TextDrawOn[playerid] = 6;
  52.             }
  53.     }
  54.     return 1;
  55.     }
  56. }
Add Comment
Please, Sign In to add comment