Advertisement
Guest User

Untitled

a guest
Aug 12th, 2014
3,188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.86 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <streamer>
  4. #include <easydialog>
  5. #include <ShowInfoForPlayer>
  6.  
  7. #define MAX_CORPS 50
  8. #define COLOR_ORANGE 0xFF9900AA
  9. #define COLOR_YELLOW 0xDABB3EAA
  10.  
  11.  
  12.  
  13. enum pDesc // A SUPPRIMER
  14. {
  15. dTaille,
  16. dPoids,
  17. dCheveux[128],
  18. dVetements[128],
  19. dSignes[128],
  20. dRapide[96]
  21. }
  22. enum pInfo // A SUPPRIMER
  23. {
  24. pDeath,
  25. Float:pDeathPos[3],
  26. pDeathInt,
  27. pDeathVW,
  28. pDeathType,
  29. pDeathBy[24],
  30. }
  31. new PlayerInfo[MAX_PLAYERS][pInfo]; // A SUPPRIMER
  32. new PlayerDesc[MAX_PLAYERS][pDesc]; // A SUPPRIMER
  33.  
  34.  
  35. enum cInfo
  36. {
  37. cId,
  38. cName[24],
  39. cIdPlayer,
  40. Float:cPos[3],
  41. cInterior,
  42. cVirtualWorld,
  43. cReason,
  44. cKilleur[24],
  45. cObject[7],
  46. cDescription[98],
  47. Text3D:cDesc
  48. }
  49. new CorpsInfo[MAX_CORPS][cInfo];
  50.  
  51. new timerdeath[MAX_PLAYERS];
  52. new timerfire[MAX_CORPS];
  53. new timerenterrer[MAX_PLAYERS];
  54.  
  55. new EnterrerTime[MAX_PLAYERS];
  56.  
  57. new FireBody[MAX_CORPS];
  58. new CarryBody[MAX_PLAYERS];
  59.  
  60. new nbCorps = 1;
  61.  
  62. public OnFilterScriptInit()
  63. {
  64. return 1;
  65. }
  66.  
  67.  
  68.  
  69. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  70. {
  71. if(newkeys == KEY_NO)
  72. {
  73. if(PlayerInfo[playerid][pDeath] == 1)
  74. PlayerDeathTime(playerid);
  75. if(CarryBody[playerid] > 0)
  76. {
  77. StopCarry(playerid);
  78. return 1;
  79. }
  80. if(IsPlayerNearBody(playerid,2.0))
  81. {
  82. new body = IsPlayerNearBody(playerid,2.0);
  83. if(EnterrerTime[playerid] > 1)
  84. {
  85. EnterrerTime[playerid] = 0;
  86. KillTimer(timerenterrer[body]);
  87. TogglePlayerControllable(playerid,1);
  88. ShowInfoForPlayer(playerid, "~r~Vous annulez l'enterrement du corps", 4000);
  89. return 1;
  90. }
  91. Dialog_Show(playerid, Body, DIALOG_STYLE_LIST, "Corps", "Porter\nBrûler\nEnterrer", "Selectionner", "Annuler");
  92. return 1;
  93. }
  94. return 1;
  95. }
  96. return 1;
  97. }
  98.  
  99.  
  100.  
  101. forward IsPlayerNearBody(playerid,Float:range);
  102. public IsPlayerNearBody(playerid,Float:range)
  103. {
  104. if(IsPlayerConnected(playerid))
  105. {
  106. for(new i = 1; i < nbCorps; i++)
  107. {
  108. if(IsPlayerInRangeOfPoint(playerid,range, CorpsInfo[i][cPos][0],CorpsInfo[i][cPos][1],CorpsInfo[i][cPos][2]))
  109. {
  110. return i;
  111. }
  112. }
  113. }
  114. return 0;
  115. }
  116.  
  117.  
  118. forward BodyFire(id);
  119. public BodyFire(id)
  120. {
  121. DestroyBody(id);
  122. return 1;
  123. }
  124.  
  125. forward DestroyBody(id);
  126. public DestroyBody(id)
  127. {
  128. CorpsInfo[id][cId] = 0;
  129. CorpsInfo[id][cPos][0] = 0;
  130. CorpsInfo[id][cPos][1] = 0;
  131. CorpsInfo[id][cPos][2] = 0;
  132. CorpsInfo[id][cInterior] = 0;
  133. CorpsInfo[id][cReason] = 0;
  134.  
  135. for(new i = 0; i < 7; i++)
  136. DestroyObject(CorpsInfo[id][cObject][i]);
  137.  
  138. Delete3DTextLabel(CorpsInfo[id][cDesc]);
  139.  
  140. nbCorps--;
  141. return 1;
  142. }
  143.  
  144. forward StopCarry(playerid);
  145. public StopCarry(playerid)
  146. {
  147. new Float:Pos[3],str[256];
  148. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  149.  
  150. CorpsInfo[CarryBody[playerid]][cPos][0] = Pos[0];
  151. CorpsInfo[CarryBody[playerid]][cPos][1] = Pos[1];
  152. CorpsInfo[CarryBody[playerid]][cPos][2] = Pos[2]-0.9;
  153.  
  154. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
  155.  
  156. format(str,sizeof(str), "%s", CorpsInfo[CarryBody[playerid]][cDescription]);
  157.  
  158. CorpsInfo[CarryBody[playerid]][cObject][0] = CreateObject(2907, CorpsInfo[CarryBody[playerid]][cPos][0],CorpsInfo[CarryBody[playerid]][cPos][1],CorpsInfo[CarryBody[playerid]][cPos][2], 0, 0, 274);
  159. CorpsInfo[CarryBody[playerid]][cObject][1] = CreateObject(2905, CorpsInfo[CarryBody[playerid]][cPos][0]+0.85376, CorpsInfo[CarryBody[playerid]][cPos][1]+0.161621, CorpsInfo[CarryBody[playerid]][cPos][2]-0.01857662, 0, 26, 278);
  160. CorpsInfo[CarryBody[playerid]][cObject][2] = CreateObject(2905, CorpsInfo[CarryBody[playerid]][cPos][0]+0.739746, CorpsInfo[CarryBody[playerid]][cPos][1]-0.158935, CorpsInfo[CarryBody[playerid]][cPos][2]+0.006423, 356.68469238281, 145.93511962891, 263.75891113281);
  161. CorpsInfo[CarryBody[playerid]][cObject][3] = CreateObject(2906, CorpsInfo[CarryBody[playerid]][cPos][0]-0.081787, CorpsInfo[CarryBody[playerid]][cPos][1]+0.239991, CorpsInfo[CarryBody[playerid]][cPos][2]-0.03601265, 359.30590820313, 273.93939208984, 298.02392578125);
  162. CorpsInfo[CarryBody[playerid]][cObject][4] = CreateObject(2906, CorpsInfo[CarryBody[playerid]][cPos][0]-0.024414, CorpsInfo[CarryBody[playerid]][cPos][1]-0.30957, CorpsInfo[CarryBody[playerid]][cPos][2]-0.03601265, 359.01071166992, 339.99688720703, 242.68936157227);
  163.  
  164. CorpsInfo[CarryBody[playerid]][cDesc] = Create3DTextLabel(str, COLOR_ORANGE,CorpsInfo[CarryBody[playerid]][cPos][0],CorpsInfo[CarryBody[playerid]][cPos][1],CorpsInfo[CarryBody[playerid]][cPos][2], 40.0, 0, 0);
  165.  
  166. CarryBody[playerid] = 0;
  167. ShowInfoForPlayer(playerid, "~g~Vous posez le corps au sol", 4000);
  168.  
  169. ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Crouch_Out", 2.0, 0, 0, 0, 0, 0);
  170.  
  171. SendEmote(playerid,"pose un corps au sol");
  172. return 1;
  173. }
  174.  
  175. forward CarryCorps(playerid,id);
  176. public CarryCorps(playerid,id)
  177. {
  178. new Float:Pos[3];
  179. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  180.  
  181. CarryBody[playerid] = id;
  182.  
  183. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_CARRY);
  184.  
  185. CorpsInfo[id][cPos][0] = 0;
  186. CorpsInfo[id][cPos][1] = 0;
  187. CorpsInfo[id][cPos][2] = 0;
  188.  
  189. for(new i = 0; i < 6; i++)
  190. DestroyObject(CorpsInfo[id][cObject][i]);
  191.  
  192.  
  193. SetPlayerAttachedObject(playerid, 0, 2907,0,Position[0],Position[1],Position[2]);
  194. SetPlayerAttachedObject(playerid, 1, 2905,0,Position[0]+0.85376, Position[1]+0.161621,Position[2]-0.01857662, 0, 26, 278);
  195. SetPlayerAttachedObject(playerid, 2, 2905,0,Position[0]+0.739746, Position[1]-0.158935,Position[2]+0.006423, 356.68469238281, 145.93511962891, 263.75891113281);
  196. SetPlayerAttachedObject(playerid, 3, 2906,0,Position[0]-0.081787, Position[1]+0.239991,Position[2]-0.03601265, 359.30590820313, 273.93939208984, 298.02392578125);
  197. SetPlayerAttachedObject(playerid, 4, 2906,0,Position[0]-0.024414, Position[1]-0.30957,Position[2]-0.03601265, 359.01071166992, 339.99688720703, 242.68936157227);
  198.  
  199. Delete3DTextLabel(CorpsInfo[id][cDesc]);
  200.  
  201. ShowInfoForPlayer(playerid, "~r~Vous prenez le corps dans vos bras", 4000);
  202.  
  203. ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Crouch_Out", 2.0, 0, 0, 0, 0, 0);
  204.  
  205. SendEmote(playerid,"attrape un corps au sol puis le met dans ses mains");
  206. return 1;
  207. }
  208.  
  209. forward ProcessDeath(playerid);
  210. public ProcessDeath(playerid)
  211. {
  212. new str[256];
  213. for(new i = 1; i < MAX_CORPS; i++)
  214. {
  215. if(CorpsInfo[i][cId] == 0)
  216. {
  217. CorpsInfo[i][cId] = i;
  218. CorpsInfo[i][cPos][0] = PlayerInfo[playerid][pDeathPos][0];
  219. CorpsInfo[i][cPos][1] = PlayerInfo[playerid][pDeathPos][1];
  220. CorpsInfo[i][cPos][2] = PlayerInfo[playerid][pDeathPos][2]-0.9;
  221. CorpsInfo[i][cInterior] = PlayerInfo[playerid][pDeathInt];
  222. CorpsInfo[i][cReason] = PlayerInfo[playerid][pDeathType];
  223.  
  224.  
  225. format(str,sizeof(str),CorpsInfo[cDescription],"%s", PlayerDesc[playerid][dRapide]);
  226. format(str,sizeof(str),CorpsInfo[cKilleur],"%s", PlayerInfo[playerid][pDeathBy]);
  227. format(str,sizeof(str),CorpsInfo[cName],"%s", returnName(playerid));
  228.  
  229.  
  230.  
  231. CorpsInfo[i][cObject][0] = CreateObject(2907, CorpsInfo[i][cPos][0],CorpsInfo[i][cPos][1],CorpsInfo[i][cPos][2], 0, 0, 274);
  232. CorpsInfo[i][cObject][1] = CreateObject(2905, CorpsInfo[i][cPos][0]+0.85376, CorpsInfo[i][cPos][1]+0.161621, CorpsInfo[i][cPos][2]-0.01857662, 0, 26, 278);
  233. CorpsInfo[i][cObject][2] = CreateObject(2905, CorpsInfo[i][cPos][0]+0.739746, CorpsInfo[i][cPos][1]-0.158935, CorpsInfo[i][cPos][2]+0.006423, 356.68469238281, 145.93511962891, 263.75891113281);
  234. CorpsInfo[i][cObject][3] = CreateObject(2906, CorpsInfo[i][cPos][0]-0.081787, CorpsInfo[i][cPos][1]+0.239991, CorpsInfo[i][cPos][2]-0.03601265, 359.30590820313, 273.93939208984, 298.02392578125);
  235. CorpsInfo[i][cObject][4] = CreateObject(2906, CorpsInfo[i][cPos][0]-0.024414, CorpsInfo[i][cPos][1]-0.30957, CorpsInfo[i][cPos][2]-0.03601265, 359.01071166992, 339.99688720703, 242.68936157227);
  236.  
  237.  
  238. CorpsInfo[i][cDesc] = Create3DTextLabel(str, COLOR_ORANGE,CorpsInfo[i][cPos][0],CorpsInfo[i][cPos][1],CorpsInfo[i][cPos][2], 40.0, 0, 0);
  239.  
  240. nbCorps++;
  241.  
  242. /*
  243. Mettre les bonnes positions de l'intérieur de l'hôpital
  244. */
  245.  
  246. SetPlayerPos(playerid, -1779.3744,3216.9727,586.8616);
  247. SetPlayerCameraPos(playerid, -1779.3744,3216.9727,586.8616);
  248. SetPlayerCameraLookAt(playerid, -1652.8186,2566.7886,84.2408);
  249.  
  250. ShowInfoForPlayer(playerid, "Vous êtes à l'hôpital pour 1 minutes", 10000);
  251.  
  252. SetTimerEx("PlayerRevive", 60000, false, "i", playerid);
  253. return 1;
  254. }
  255. }
  256. return 1;
  257. }
  258.  
  259.  
  260. public OnPlayerDisconnect(playerid,reason)
  261. {
  262. if(CarryBody[playerid] > 0)
  263. {
  264. StopCarry(playerid);
  265. return 1;
  266. }
  267. return 1;
  268. }
  269.  
  270. forward PlayerRevive(playerid);
  271. public PlayerRevive(playerid)
  272. {
  273. PlayerInfo[playerid][pDeath] = 0;
  274. PlayerInfo[playerid][pDeathPos][0] = 0;
  275. PlayerInfo[playerid][pDeathPos][1] = 0;
  276. PlayerInfo[playerid][pDeathPos][2] = 0;
  277. PlayerInfo[playerid][pDeathInt] = 0;
  278. PlayerInfo[playerid][pDeathVW] = 0;
  279. PlayerInfo[playerid][pDeathType] = 0;
  280. PlayerInfo[playerid][pDeathBy] = 0;
  281.  
  282. SetPlayerHealth(playerid,50);
  283. TogglePlayerControllable(playerid,1);
  284.  
  285. SetPlayerPos(playerid, 1172.7332,-1323.6276,15.4014);
  286. SetPlayerFacingAngle(playerid,181.4810);
  287. SetPlayerInterior(playerid,0);
  288. SetPlayerVirtualWorld(playerid,0);
  289. SetCameraBehindPlayer(playerid);
  290. return 1;
  291. }
  292.  
  293. forward PlayerRespawnDeath(playerid);
  294. public PlayerRespawnDeath(playerid)
  295. {
  296.  
  297. SetPlayerPos(playerid,PlayerInfo[playerid][pDeathPos][0],PlayerInfo[playerid][pDeathPos][1],PlayerInfo[playerid][pDeathPos][2]);
  298. SetPlayerInterior(playerid,PlayerInfo[playerid][pDeathInt]);
  299. SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pDeathVW]);
  300.  
  301. if(PlayerInfo[playerid][pDeathType] == 49 || PlayerInfo[playerid][pDeathType] == 50)
  302. {
  303. PlayerRevive(playerid);
  304. return 1;
  305. }
  306.  
  307. SendClientMessage(playerid,COLOR_YELLOW,"Vous venez d'être tuer, vous ne pouvez plus bouger jusqu'a ce que les secoures arrivent.");
  308. SendClientMessage(playerid,COLOR_YELLOW,"Si quelqu'un vous achève, vous irez à l'hôpital.");
  309. SendClientMessage(playerid,COLOR_YELLOW,"Si vous déconnectez, vous irez à l'hôpital");
  310. SendClientMessage(playerid,COLOR_YELLOW,"Si vous ne voulez pas attendre les secoures appuiez sur N");
  311.  
  312. SetPlayerHealth(playerid,25);
  313. TogglePlayerControllable(playerid,0);
  314. ApplyAnimation(playerid, "PARACHUTE", "FALL_skyDive_DIE", 4.0, 0, 1, 1, 1, -1);
  315.  
  316. timerdeath[playerid] = SetTimerEx("PlayerDeathTime", 600000, false, "i", playerid);
  317. return 1;
  318. }
  319.  
  320. forward PlayerDeathTime(playerid);
  321. public PlayerDeathTime(playerid)
  322. {
  323. if(PlayerInfo[playerid][pDeath] == 1)
  324. ProcessDeath(playerid);
  325.  
  326. KillTimer(timerdeath[playerid]);
  327. return 1;
  328. }
  329.  
  330. forward PlayerDeath(playerid,reason,killed[24]);
  331. public PlayerDeath(playerid,reason,killed[24])
  332. {
  333. new Float:Pos[3];
  334. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  335.  
  336. PlayerInfo[playerid][pDeath] = 1;
  337. PlayerInfo[playerid][pDeathPos][0] = Pos[0];
  338. PlayerInfo[playerid][pDeathPos][1] = Pos[1];
  339. PlayerInfo[playerid][pDeathPos][2] = Pos[2];
  340. PlayerInfo[playerid][pDeathInt] = GetPlayerInterior(playerid);
  341. PlayerInfo[playerid][pDeathVW] = GetPlayerVirtualWorld(playerid);
  342. PlayerInfo[playerid][pDeathType] = reason;
  343. PlayerInfo[playerid][pDeathBy] = killed;
  344.  
  345. return 1;
  346. }
  347.  
  348.  
  349. public OnPlayerSpawn(playerid)
  350. {
  351. if(PlayerInfo[playerid][pDeath] == 1)
  352. PlayerRespawnDeath(playerid);
  353.  
  354. if(PlayerInfo[playerid][pDeath] == 2)
  355. ProcessDeath(playerid);
  356. return 1;
  357. }
  358.  
  359. public OnPlayerDeath(playerid, killerid, reason)
  360. {
  361. if(CarryBody[playerid] > 0)
  362. StopCarry(playerid);
  363.  
  364. if(PlayerInfo[playerid][pDeath] == 1)
  365. PlayerInfo[playerid][pDeath] = 2;
  366.  
  367. if(PlayerInfo[playerid][pDeath] == 0)
  368. PlayerDeath(playerid,reason,returnName(killerid));
  369.  
  370.  
  371. return 1;
  372. }
  373.  
  374.  
  375.  
  376. Dialog:Body(playerid, response, listitem, inputtext[])
  377. {
  378. if (response)
  379. {
  380. if(listitem == 0)
  381. {
  382. if(IsPlayerNearBody(playerid,2.0))
  383. {
  384. new body = IsPlayerNearBody(playerid,2.0);
  385. CarryCorps(playerid,body);
  386. return 1;
  387. }
  388. return 1;
  389. }
  390. if(listitem == 1)
  391. {
  392. /* METTRE CONDITION EN DEHORS DE LA VILLE */
  393. if(IsPlayerNearBody(playerid,2.0))
  394. {
  395. /*
  396. Ajouter les condition pour le brûler
  397. */
  398. new body = IsPlayerNearBody(playerid,2.0);
  399. ShowInfoForPlayer(playerid, "~g~Vous brulez le corps au sol", 6000);
  400. timerfire[body] = SetTimerEx("BodyFire",600000, false, "i",body);
  401. FireBody[body] = 1;
  402. SendEmote(playerid,"met le feu au corps");
  403. CorpsInfo[body][cObject][6] = CreateObject(18691, CorpsInfo[body][cPos][0],CorpsInfo[body][cPos][1],CorpsInfo[body][cPos][2]-1.3, 0, 0, 274);
  404. return 1;
  405. }
  406. return 1;
  407. }
  408. if(listitem == 2)
  409. {
  410. if(IsPlayerNearBody(playerid,2.0))
  411. {
  412. if(GetPlayerWeapon(playerid) != 6) return ShowInfoForPlayer(playerid, "~g~Vous n'avez pas une pelle en main", 6000);
  413. if(PlayerInfo[playerid][pEnergie] != 100) return ShowInfoForPlayer(playerid, "~g~Vous devez avoir 100% d'énergie", 6000);
  414.  
  415. EnterrerTime[playerid] = 360;
  416. ShowInfoForPlayer(playerid, "~g~Vous enterrez le corps au sol appuiez sur N pour annuler.", 1000);
  417. TogglePlayerControllable(playerid,0);
  418. new body = IsPlayerNearBody(playerid,2.0);
  419. timerenterrer[body] = SetTimerEx("BodyEnterrer", 5000, 1, "ii",playerid,body);
  420. ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Crouch_Out", 2.0, 0, 0, 0, 0, 0);
  421. SendEmote(playerid,"commence à enterrer le corps");
  422. }
  423. return 1;
  424. }
  425. }
  426. return 1;
  427. }
  428.  
  429.  
  430. forward BodyEnterrer(playerid,id);
  431. public BodyEnterrer(playerid,id)
  432. {
  433. new body = IsPlayerNearBody(playerid,3.0);
  434. if(IsPlayerNearBody(playerid,3.0))
  435. {
  436. if(EnterrerTime[playerid] > 1)
  437. {
  438. DownEnergie(playerid,-0.28);
  439. EnterrerTime[playerid] -= 5;
  440. ShowInfoForPlayer(playerid, "~g~Vous enterrez le corps au sol appuiez sur N pour annuler.", 1000);
  441. ApplyAnimation(playerid, "BOMBER", "BOM_Plant_Crouch_Out", 4.0, 0, 0, 0, 0, 0);
  442. return 1;
  443. }
  444. EnterrerTime[playerid] = 0;
  445. DestroyBody(body);
  446. KillTimer(timerenterrer[body]);
  447. TogglePlayerControllable(playerid,1);
  448. return 1;
  449. }
  450. KillTimer(timerenterrer[body]);
  451. return 1;
  452. }
  453.  
  454.  
  455. CMD:corpsinfo(playerid,params[])
  456. {
  457. new body = IsPlayerNearBody(playerid,2.0);
  458. new str[256],gunname[32];
  459. if(IsPlayerNearBody(playerid,3.0))
  460. {
  461. GetWeaponName(CorpsInfo[body][cReason],gunname,sizeof(gunname));
  462. format(str,sizeof(str),"Ce corps appartient à %s, il a été tuer avec l'arme '%s' par %s",CorpsInfo[body][cName],gunname,CorpsInfo[body][cKilleur]);
  463. SendClientMessage(playerid,COLOR_ORANGE,str);
  464. return 1;
  465. }
  466. return 1;
  467. }
  468.  
  469. CMD:suppcorps(playerid,params[])
  470. {
  471. if(PlayerInfo[playerid][pAdmin] < ADMIN_LVL_ADMIN) return ShowInfoForPlayer(playerid, "~r~Votre niveau d'autorisation n'est pas assez haut pour effecter cette commande", 6000);
  472. new body = IsPlayerNearBody(playerid,2.0);
  473. if(IsPlayerNearBody(playerid,3.0))
  474. {
  475. DestroyBody(body);
  476. ShowInfoForPlayer(playerid, "~g~Vous supprimez le corps prêt de vous", 1000);
  477. return 1;
  478. }
  479. return 1;
  480. }
  481.  
  482. CMD:revive(playerid,params[])
  483. {
  484. if(PlayerInfo[playerid][pAdmin] < ADMIN_LVL_ADMIN) return ShowInfoForPlayer(playerid, "~r~Votre niveau d'autorisation n'est pas assez haut pour effecter cette commande", 6000);
  485. new target,str[256];
  486. if(!sscanf(params, "u", target))
  487. {
  488. if (target != INVALID_PLAYER_ID)
  489. {
  490. PlayerInfo[target][pDeath] = 0;
  491. PlayerInfo[target][pDeathPos][0] = 0;
  492. PlayerInfo[target][pDeathPos][1] = 0;
  493. PlayerInfo[target][pDeathPos][2] = 0;
  494. PlayerInfo[target][pDeathInt] = 0;
  495. PlayerInfo[target][pDeathVW] = 0;
  496. PlayerInfo[target][pDeathType] = 0;
  497. PlayerInfo[target][pDeathBy] = 0;
  498. SetPlayerHealth(target,50);
  499. TogglePlayerControllable(target,1);
  500. ClearAnimations(target);
  501.  
  502. format(str,sizeof(str),"L'admin %s viens de vous remettre en vie",returnName(playerid));
  503. ShowInfoForPlayer(target, str, 5000);
  504. format(str,sizeof(str),"Vous remettez en vie %s",returnName(target));
  505. ShowInfoForPlayer(playerid, str, 5000);
  506.  
  507. }
  508. return 1;
  509. }
  510. return 1;
  511. }
  512.  
  513.  
  514. /*
  515.  
  516. SCRIPT A AJOUTER APRES LA CONNEXION
  517.  
  518. if(PlayerInfo[playerid][pDeath] == 1)
  519. {
  520. ProcessDeath(playerid);
  521. }
  522. */
  523.  
  524.  
  525.  
  526. stock returnName(playerid)
  527. {
  528. new name[24];
  529. GetPlayerName(playerid, name, 24);
  530. return name;
  531. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement