Guest User

SA-MP FINGERPRINT Script

a guest
Sep 20th, 2011
1,166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. //FingerPrint system by SourceCode, You need to change the cop variable to integrate
  2. //Check the comment
  3. #include <a_samp>
  4. #include <foreach>
  5. #include <streamer>
  6.  
  7. new Cop[MAX_PLAYERS];
  8. new killer1[MAX_PLAYERS];
  9. new Float:Xa[MAX_PLAYERS];
  10. new Float:Ya[MAX_PLAYERS];
  11. new O[MAX_PLAYERS];
  12. new Float:Za[MAX_PLAYERS];
  13. new Reason[MAX_PLAYERS];
  14. #define COLOR_RED 0xAA3333FF
  15.  
  16. public OnPlayerDeath(playerid, killerid, reason)
  17. {
  18. DestroyDynamicObject(O[playerid]);
  19. GetPlayerPos(playerid, Xa[playerid], Ya[playerid], Za[playerid]);
  20. O[playerid] = CreateDynamicObject(3092, Xa[playerid], Ya[playerid], Za[playerid],0, 0, 274);
  21. Create3DTextLabel("Blood Stains and Fingerprints",0xAA3333AA,Xa[playerid],Ya[playerid],Za[playerid],40.0,0);
  22. killer1[playerid] = killerid;
  23. Reason[playerid] = reason;
  24.  
  25.  
  26. }
  27.  
  28. public OnPlayerCommandText(playerid, cmdtext[])
  29. {
  30. new idx;
  31. new cmd[128];
  32. cmd = strtok(cmdtext, idx);
  33. if(strcmp(cmd, "/getevidence", true) == 0)
  34. {
  35. if(Cop[playerid] == 0) //Your own variable u must change it
  36. {
  37. SendClientMessage(playerid, COLOR_RED, " You are not a Cop / FBI / Prison Guard !");
  38. return 1;
  39. }
  40. foreach (Player, i)
  41. {
  42. if(IsPlayerInRangeOfPoint(playerid, 3, Xa[i], Ya[i], Za[i]))
  43. {
  44.  
  45. new name[128];
  46. new string[100]; //Not sure about this size
  47. GetPlayerName(killer1[i], name, sizeof(name));
  48. format(string, sizeof(string),"The body was murdered by %s , Cause: %s.",name,Reason[i]);
  49. SendClientMessage(playerid, COLOR_RED, string);
  50.  
  51. }
  52. else
  53. {
  54. SendClientMessage(playerid, COLOR_RED, " You are not near any deadbody");
  55. return 1;
  56. }
  57. }
  58. }
  59. return 0;
  60. }
  61.  
  62.  
  63. strtok(const string[], &index)
  64. {
  65. new length = strlen(string);
  66. while ((index < length) && (string[index] <= ' '))
  67. {
  68. index++;
  69. }
  70.  
  71. new offset = index;
  72. new result[20];
  73. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  74. {
  75. result[index - offset] = string[index];
  76. index++;
  77. }
  78. result[index - offset] = EOS;
  79. return result;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment