Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Text:houseTD[MAX_PLAYERS];
- new TextDrawOn[MAX_PLAYERS];
- public OnPlayerConnect
- {
- TextDrawOn[playerid] = 0;
- houseTD[playerid] = TextDrawCreate(10.0, 140, "_");
- TextDrawColor(houseTD[playerid], 0x00bfffff);
- TextDrawUseBox(houseTD[playerid], 1);
- TextDrawBoxColor(houseTD[playerid], 0x00000070);
- TextDrawSetShadow(houseTD[playerid], 1);
- TextDrawSetOutline(houseTD[playerid], 1);
- TextDrawBackgroundColor(houseTD[playerid], 0x000000ff);
- TextDrawFont(houseTD[playerid], 2);
- TextDrawSetProportional(houseTD[playerid], 1);
- TextDrawTextSize(houseTD[playerid], 185.0, 280.0);
- TextDrawLetterSize(houseTD[playerid], 0.3, 0.7);
- TextDrawHideForPlayer(playerid, houseTD[playerid]);
- return 1;
- }
- public GlobalPlayerTimer
- {
- if(TextDrawOn[i] > 0)
- {
- TextDrawOn[i] -= 1;
- }
- if(TextDrawOn[i] == 1)
- {
- TextDrawHideForPlayer(i, houseTD[i]);
- }
- TextDrawHideForPlayer(i, houseTD[i]);
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if(checkpointid == houseCP[h])
- {
- if(IsPlayerInAnyVehicle(playerid)) return 1;
- if(TextDrawOn[playerid] == 1) return 1;
- new strstr[150];
- format(strstr,sizeof(strstr),
- "~g~House is to sell~n~~w~Number: ~g~%d~n~w~Adress: ~g~%s~n~w~Price:~g~%d~g~$%d",
- HouseInfo[h][hAdress],HouseInfo[h][hName],HouseInfo[h][hPrice]);
- TextDrawSetString(houseTD[playerid], strstr);
- TextDrawShowForPlayer(playerid, houseTD[playerid]);
- TextDrawOn[playerid] = 6;
- }
- }
- return 1;
- }
- }
Add Comment
Please, Sign In to add comment