Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <streamer>
- #define COLOR_ERROR 0xD2691EAA
- new IsSafe[MAX_PLAYERS];
- new Text:Safe;
- public OnGameModeInit()
- {
- Safe = TextDrawCreate(514.000000, 150.000000, "Safe Place");
- TextDrawBackgroundColor(Safe, 255);
- TextDrawFont(Safe, 1);
- TextDrawLetterSize(Safe, 0.500000, 1.000000);
- TextDrawColor(Safe, 16777215);
- TextDrawSetOutline(Safe, 0);
- TextDrawSetProportional(Safe, 1);
- TextDrawSetShadow(Safe, 1);
- TextDrawUseBox(Safe, 1);
- TextDrawBoxColor(Safe, 255);
- TextDrawTextSize(Safe, 554.000000, 0.000000);
- //Safe Place
- CreateDynamicObject(19378, -159.85001, 1779.27002, -100.86000, 0.00000, 90.00000, 0.00000);
- CreateObject(19378, -159.85001, 1769.64001, -100.86000, 0.00000, 90.00000, 0.00000);
- CreateDynamicObject(19460, -154.55000, 1769.66003, -99.04000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(19460, -154.55000, 1779.29004, -99.04000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(19460, -159.42000, 1783.98999, -99.04000, 0.00000, 0.00000, 90.00000);
- CreateDynamicObject(19460, -164.27000, 1779.27002, -99.04000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(19460, -164.27000, 1769.64001, -99.04000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(19460, -159.42000, 1764.81995, -99.04000, 0.00000, 0.00000, 90.00000);
- CreateDynamicObject(19378, -159.85001, 1779.45996, -104.92000, 90.00000, 0.00000, 90.00000);
- CreateDynamicObject(19379, -159.85001, 1784.27002, -100.39000, 0.00000, 90.00000, 180.00000);
- CreateDynamicObject(16151, -155.71001, 1769.66003, -100.43000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(2779, -163.67999, 1767.04004, -100.79000, 0.00000, 0.00000, 90.00000);
- CreateDynamicObject(2681, -163.67999, 1768.28003, -100.79000, 0.00000, 0.00000, 90.00000);
- CreateDynamicObject(1569, -161.16000, 1764.87000, -100.78000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(1569, -158.17999, 1764.87000, -100.78000, 0.00000, 0.00000, 180.00000);
- CreateDynamicObject(1716, -162.60001, 1768.65002, -100.79000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(1716, -162.60001, 1767.38000, -100.79000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(2001, -163.67999, 1765.37000, -100.77000, 0.00000, 0.00000, 20.00000);
- CreateDynamicObject(14392, -149.20000, 1784.97998, -99.06000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(1716, -156.28000, 1782.14001, -100.32000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(2229, -154.70000, 1764.85999, -100.80000, 0.00000, 0.00000, -90.00000);
- CreateDynamicObject(2104, -154.56000, 1768.43994, -100.78000, 0.00000, 0.00000, -90.00000);
- CreateDynamicObject(2229, -154.70000, 1773.89001, -100.80000, 0.00000, 0.00000, -90.00000);
- CreateDynamicObject(1514, -156.70000, 1768.41003, -99.57000, 0.00000, 0.00000, -90.00000);
- CreateDynamicObject(2425, -154.57001, 1768.43005, -99.47000, 0.00000, 0.00000, -90.00000);
- CreateDynamicObject(2429, -154.39999, 1767.82996, -99.76000, 0.00000, 0.00000, -90.00000);
- CreateDynamicObject(2251, -156.35001, 1766.42004, -98.96000, 0.00000, 0.00000, 20.00000);
- CreateDynamicObject(1723, -161.61000, 1770.96997, -100.77000, 0.00000, 0.00000, 181.00000);
- CreateDynamicObject(1723, -163.62000, 1773.27002, -100.77000, 0.00000, 0.00000, -0.50000);
- CreateDynamicObject(1723, -161.61000, 1774.33997, -100.77000, 0.00000, 0.00000, 179.00000);
- CreateDynamicObject(1723, -163.62000, 1776.68005, -100.77000, 0.00000, 0.00000, 2.00000);
- CreateDynamicObject(2315, -163.41000, 1772.12000, -100.77000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(2315, -163.41000, 1775.52002, -100.77000, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(2254, -164.14999, 1773.76001, -98.94000, 0.00000, 0.00000, 90.00000);
- CreateDynamicObject(2215, -162.66000, 1775.65002, -100.22000, -26.00000, 23.00000, 270.00000);
- CreateDynamicObject(2217, -163.42000, 1772.01001, -100.22000, -26.00000, 23.00000, 270.00000);
- CreateDynamicObject(2099, -163.63000, 1783.51001, -100.30000, 0.00000, 0.00000, 30.00000);
- CreateDynamicObject(19380, -159.50000, 1779.45996, -97.26000, 0.00000, 90.00000, 0.00000);
- CreateDynamicObject(19380, -159.50999, 1769.81995, -97.26000, 0.00000, 90.00000, 0.00000);
- CreateDynamicObject(19380, -159.57001, 1760.18994, -97.26000, 0.00000, 90.00000, 0.00000);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- IsSafe[playerid] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- IsSafe[playerid]=0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- IsSafe[playerid] =0;
- return 1;
- }
- forward ResetVariables(playerid);
- public ResetVariables(playerid)
- {
- IsSafe[playerid]=0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/safe", cmdtext, true, 10) == 0)
- {
- if(IsSafe[playerid] == 1)
- {
- SendClientMessage(playerid,COLOR_ERROR,"Vous Γͺtes dΓ©jΓ en Safe Mode.");
- return 1;
- }
- SetPlayerPos(playerid,-159.6199,1766.9670,-99.7741);
- SetPlayerFacingAngle(playerid,358.1475);
- TextDrawShowForPlayer(playerid,Safe);
- IsSafe[playerid] =1;
- Safed(playerid);
- return 1;
- }
- return 0;
- }
- stock Safed(playerid) {
- SetPlayerHealth(playerid,999999);
- SetPlayerArmour(playerid,999999);
- ResetPlayerWeapons(playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment