Advertisement
Guest User

Untitled

a guest
Jun 24th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.65 KB | None | 0 0
  1. CMD:playsounds(playerid, params[])
  2. {
  3. new soundid;
  4. if(sscanf(params, "d", soundid)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /playsounds [soundid]");
  5. PlaySound(playerid, soundid);
  6. SendClientMessage(playerid, COLOR_GREEN, "Playing {FF0000}Sound!");
  7. return 1;
  8. }
  9. CMD:savestats(playerid, params[])
  10. {
  11. new file[300];
  12. new name[MAX_PLAYER_NAME];
  13. GetPlayerName(playerid, name, sizeof(name));
  14. format(file,sizeof(file),"nAdmin/Users/%s.ini",name);
  15. PlayerInfo[playerid][score] = GetPlayerScore(playerid);
  16. PlayerInfo[playerid][cash] = GetPlayerMoney(playerid);
  17. if(logged[playerid] == 1)
  18. {
  19. dini_IntSet(file, "Score", PlayerInfo[playerid][score]);
  20. dini_IntSet(file, "Money", PlayerInfo[playerid][cash]);
  21. dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel]);
  22. dini_IntSet(file, "VipLevel", PlayerInfo[playerid][VipLevel]);
  23. dini_IntSet(file, "Banned", PlayerInfo[playerid][Banned]);
  24. dini_IntSet(file, "Muted", PlayerInfo[playerid][Muted]);
  25. dini_IntSet(file, "Deaths", PlayerInfo[playerid][Deaths]);
  26. dini_IntSet(file, "Kills", PlayerInfo[playerid][Kills]);
  27. }
  28. logged[playerid] = 0;
  29. GameTextForPlayer(playerid, "~r~Stats ~g~Successfully ~p~Saved!", 4000, 1);
  30. return 1;
  31. }
  32. CMD:stats(playerid,params[])
  33. {
  34. if(IsPlayerConnected(playerid))
  35. {
  36. new money = PlayerInfo[playerid][cash];
  37. new deaths = PlayerInfo[playerid][Deaths];
  38. new kills = PlayerInfo[playerid][Kills];
  39. new Score = PlayerInfo[playerid][score];
  40. new admin = PlayerInfo[playerid][AdminLevel];
  41. new vip = PlayerInfo[playerid][VipLevel];
  42. new string1[1024];
  43. format(string1, sizeof string1, "{44A1D0}Money: {FFFFFF}%d \n{44A1D0}Deaths: {FFFFFF}%d \n{44A1D0}Kills: {FFFFFF}%d \n{44A1D0}Score: {FFFFFF}%d \n{44A1D0}Admin Level: {FFFFFF}%d \n{44A1D0}Vip Level: {FFFFFF}%d", money, deaths, kills, Score, admin, vip);
  44. ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Your account Statistics:",string1,"Ok","");
  45. }
  46. return 1;
  47. }
  48. CMD:rules(playerid, params[])
  49. {
  50. ShowPlayerDialog(playerid, DIALOG_RULESCMD, DIALOG_STYLE_MSGBOX, "StreetRodZ Rules", "{FF0000}StreetRodZ Rules:\nYou may NOT begg for admin! doing so could result in a Ban!\nAdvertising will lead into a STRAIGHT ban!\nDo NOT ask for VIP! only way to get it is at {FF0000}www.streetrodzracers.tk\nSwearing/Insulting an Admin/Player will result in a ban/kick/mute!\nDont Spam the chat or you get kicked\n\nDisrespecting any of these rules will result in a ban!\n\nhave fun!", "Accept", "Decline");
  51. return 1;
  52. }
  53. CMD:pimp(playerid, params[])
  54. {
  55. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be the driver of the vehicle or be onfoot to use this command");
  56. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be in a vehicle to use this command");
  57. ShowPlayerDialog(playerid, DIALOG_PIMP, DIALOG_STYLE_LIST, "Pimp Your Ride", "Paintjobs\nWheels\nHydraulics\nBass Boost", "Select", "Cancel");
  58. return 1;
  59. }
  60. CMD:santahat(playerid, params[])
  61. {
  62. if(PlayerInfo[playerid][HasSantaHat] == false)
  63. {
  64. SetPlayerAttachedObject(playerid, SANTAHAT, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
  65. GameTextForPlayer(playerid, "~r~Merry ~g~X~w~-~b~Mas", 2000, 6);
  66. PlayerInfo[playerid][HasSantaHat] = true;
  67. }
  68. else if(PlayerInfo[playerid][HasSantaHat] == true)
  69. {
  70. RemovePlayerAttachedObject(playerid, SANTAHAT);
  71. PlayerInfo[playerid][HasSantaHat] = false;
  72. }
  73. return 1;
  74. }
  75. CMD:sh(playerid, params[])
  76. {
  77. return cmd_santahat(playerid, params);
  78. }
  79. CMD:shat(playerid, params[])
  80. {
  81. return cmd_santahat(playerid, params);
  82. }
  83. CMD:joinhns(playerid, params[])
  84. {
  85. if(PlayerInfo[playerid][Jailed] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command when you are in jail");
  86. if(EventStarted == true)
  87. {
  88. new file[256], Float:x, Float:y, Float:z, Interior;
  89. format(file,sizeof(file),"nAdmin/Config/Events.txt");
  90. x = dini_Float(file, "CoordX");
  91. y = dini_Float(file, "CoordY");
  92. z = dini_Float(file, "CoordZ");
  93. Interior = dini_Int(file, "Interior");
  94. SetPlayerInterior(playerid, Interior);
  95. SetPlayerPos(playerid, x, y, z);
  96. SetPlayerVirtualWorld(playerid, 0);
  97. PlayerInfo[playerid][JoinedEvent] = true;
  98. }
  99. else if(EventStarted == false) return SendClientMessage(playerid, COLOR_RED, "ERROR: there is no event started or there is already an event going on.");
  100. return 1;
  101. }
  102. CMD:car(playerid, params[])
  103. {
  104. if(PlayerInfo[playerid][Jailed] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command when you are in jail");
  105. if(PlayerInfo[playerid][World] != DMWorldID && PlayerInfo[playerid][World] != TDMWorldID)
  106. {
  107. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "ERROR: you need to be the driver of the vehicle or be onfoot to use this command");
  108. new aVehicle[64], Color1, Color2;
  109. if(sscanf(params, "s[64]I(-1)I(-1)", aVehicle, Color1, Color2)) return SendClientMessage(playerid,COLOR_YELLOW, "Correct usage: /car [car ID/name] [color1] [color2]");
  110. new veh = GetVehicleModelID(aVehicle);
  111. if(veh < 400 || veh > 611) return SendClientMessage(playerid,COLOR_RED, "ERROR: This is not a valid vehicle name! Please try again ");
  112. if(IsPlayerInAnyVehicle(playerid)) DestroyVehicle(GetPlayerVehicleID(playerid));
  113. new Float:Pos[4];
  114. GetPlayerPos(playerid, Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(playerid, Pos[3]);
  115. new PVeh = CreateVehicle(veh, Pos[0], Pos[1], Pos[2], Pos[3]+90, Color1, Color2, -1);
  116. LinkVehicleToInterior(PVeh, GetPlayerInterior(playerid));
  117. SetVehicleVirtualWorld(PVeh, GetPlayerVirtualWorld(playerid));
  118. PutPlayerInVehicle(playerid, PVeh, 0);
  119. vehhasmissile[veh] = 0;
  120. vehhasminigun[veh] = 0;
  121. vehhascargo[veh] = 0;
  122. vehhaswindshieldupgrade[veh] = 0;
  123. vehhascarwreck[veh] = 0;
  124. SendCommandToAdmins(playerid,"/car");
  125. GameTextForPlayer(playerid, "~y~Enjoy your new ~r~ride", 2000, 1);
  126. return 1;
  127. }
  128. else return SendClientMessage(playerid, COLOR_RED, "ERROR: you can't use this command in this world");
  129. }
  130. CMD:getplut(playerid, params[])
  131. {
  132. PlayerInfo[playerid][HasPlutonium] = 2;
  133. return 1;
  134. }
  135. CMD:fightstyles(playerid, params[])
  136. {
  137. if(PlayerInfo[playerid][World] == DMWorldID)
  138. {
  139. ShowPlayerDialog(playerid, DIALOG_FIGHTSTYLES, DIALOG_STYLE_LIST, "Fighting Styles Available", "Style 1:\t{FF0000}Normal\nStyle 2:\t{00FF00}Boxing\nStyle 3:\t{0000FF}Kung-Fu\nStyle 4:\t{FF6400}Kneehead\nStyle 5:\t{00C2FF}Grab Kick\nStyle 6:\t{FF00FF}Elbow", "Change", "Cancel");
  140. SendCommandToAdmins(playerid,"/fightstyles");
  141. }
  142. else return SendClientMessage(playerid, COLOR_RED, "ERROR: you may only use this command in the Deathmatch World");
  143. return 1;
  144. }
  145. CMD:fstyles(playerid, params[])
  146. {
  147. return cmd_fightstyles(playerid, params);
  148. }
  149. CMD:repair(playerid, params[])
  150. {
  151. if(PlayerInfo[playerid][World] == TDMWorldID) return SendClientMessage(playerid, COLOR_RED, "you can't use this command in this world");
  152. SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
  153. GameTextForPlayer(playerid, "~g~car~r~ repaired", 2000, 1);
  154. SendCommandToAdmins(playerid,"/repair");
  155. return 1;
  156. }
  157. CMD:flip(playerid, params[])
  158. {
  159. if(PlayerInfo[playerid][World] == TDMWorldID) return SendClientMessage(playerid, COLOR_RED, "you can't use this command in this world");
  160. FlipVehicle(playerid);
  161. SendCommandToAdmins(playerid,"/flip");
  162. return 1;
  163. }
  164. CMD:sorry(playerid, params[])
  165. {
  166. new targetid;
  167. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /sorry [playerid]");
  168. if(targetid != INVALID_PLAYER_ID && targetid != playerid)
  169. {
  170. new tname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  171. GetPlayerName(playerid, name, sizeof(name));
  172. GetPlayerName(targetid, tname, sizeof(tname));
  173. format(string, sizeof(string), "%s wants %s to know that he is Sorry, could you forgive me %s?", name, tname, tname);
  174. SendClientMessageToAll(PLAYERCOLOR_AQUA, string);
  175. SendCommandToAdmins(playerid,"/sorry");
  176. }
  177. else return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid or playerid is yourself");
  178. return 1;
  179. }
  180. CMD:forgive(playerid, params[])
  181. {
  182. new targetid;
  183. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /forgive [playerid]");
  184. if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid");
  185. SendCommandToAdmins(playerid,"/forgive");
  186. new name[MAX_PLAYER_NAME], tname[MAX_PLAYER_NAME];
  187. GetPlayerName(playerid, name, sizeof(name));
  188. GetPlayerName(targetid, tname, sizeof(tname));
  189. new string[128];
  190. format(string, sizeof(string), "%s has accepted the appology and forgiven %s", name, tname);
  191. SendClientMessageToAll(PLAYERCOLOR_AQUA, string);
  192. return 1;
  193. }
  194. CMD:hate(playerid, params[])
  195. {
  196. new targetid, reason[128];
  197. if(sscanf(params, "us[128]", targetid, reason)) return SendClientMessage(playerid, COLOR_YELLOW, "Correct Usage: /hate [playerid] [reason]");
  198. if(targetid != INVALID_PLAYER_ID)
  199. {
  200. new tname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
  201. GetPlayerName(playerid, name, sizeof(name));
  202. GetPlayerName(targetid, tname, sizeof(tname));
  203. new string[128];
  204. SendCommandToAdmins(playerid,"/hate");
  205. format(string, sizeof(string), "Player %s Hates %s, Reason: %s", name, tname, reason);
  206. SendClientMessageToAll(PLAYERCOLOR_AQUA, string);
  207. }
  208. else return SendClientMessage(playerid, COLOR_RED, "ERROR: invalid playerid");
  209. return 1;
  210. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement