Dayrion

Untitled

May 14th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.76 KB | None | 0 0
  1. case D_R_Rules:
  2. {
  3. if(response)
  4. {
  5. TogglePlayerSpectating(playerid, 0);
  6. if(strcmp(U_Stats[playerid][pGender], "Female")){
  7. U_Stats[playerid][pSkin] = 17;}
  8. else {
  9. U_Stats[playerid][pSkin] = 93;}
  10. SetSpawnInfo(playerid, 0, U_Stats[playerid][pSkin], 1743.1300, -1861.9683, 13.5769, 359.2573, 0, 0, 0, 0, 0, 0); // Erorr was here
  11. SpawnPlayer(playerid);
  12. GivePlayerMoney(playerid, 25000);
  13. SetPlayerScore(playerid, 1);
  14. new INI:File = INI_Open(UserPath(playerid));
  15. INI_SetTag(File, "data");
  16. INI_WriteInt(File, "Skin", 17);
  17. INI_WriteInt(File, "Interior", 0);
  18. INI_WriteInt(File, "VW", 0);
  19. INI_WriteFloat(File, "PositionX", 1743.1300);
  20. INI_WriteFloat(File, "PositionY", -1861.9683);
  21. INI_WriteFloat(File, "PositionZ", 13.5769);
  22. INI_WriteInt(File, "Money", 25000);
  23. INI_WriteInt(File, "Level", 1);
  24. INI_WriteInt(File, "Job1", 0);
  25. INI_WriteInt(File, "Job2", 0);
  26. INI_WriteInt(File, "Flags", 0);
  27. INI_WriteInt(File, "Banned", 0);
  28. INI_WriteString(File, "BanBy", "0");
  29. INI_WriteString(File, "BanReason", "0");
  30. new plrIP[16];
  31. GetPlayerIp(playerid, plrIP, sizeof(plrIP));
  32. INI_WriteString(File, "RegIP", plrIP);
  33. INI_WriteString(File, "LastIP", plrIP);
  34. INI_WriteInt(File, "Faction", 0);
  35. INI_WriteString(File, "Rank", "None");
  36. INI_Close(File);
  37. SendClientMessage(playerid, -1, "{FFFFFF}[{82CAFF}NCRP{FFFFFF}] Welcome to New City Roleplay! Are you in need of help? Feel free to use /m(oderator)m(essage)!");
  38. SendClientMessage(playerid, -1, "{FFFFFF}[{82CAFF}NCRP{FFFFFF}] You may use /o(oc)c(hat) to chat globaly.");
  39. new message[255];
  40. format(message, 255, "{FFFFFF}[{82CAFF}NCRP{FFFFFF}] Welcome our newest user %s to NCRP!", GetName(playerid));
  41. SendClientMessageToAll(-1, message);
  42. return 1;
  43. }
  44. }
  45.  
  46.  
  47. CMD:askin(playerid,params[])
  48. {
  49. if(U_Stats[playerid][pLevel] > 12)
  50. {
  51. new idskin, cible, string2[200];
  52. if(sscanf(params,"ii", cible, idskin)) return SendClientMessage(playerid, -1, "[{82CAFF}Use{FFFFFF}] /askin [player_id] [skin_id]");
  53. if(idskin<0||idskin>311) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] Invalid Skin ID [0-311]");
  54. SetPlayerSkin(cible, idskin);
  55. format(string2, sizeof(string2), "[{ff0000}Admin{FFFFFF}] You have change the {ff0000}%s{FFFFFF}'s (ID: {82CAFF}%i{FFFFFF}) skin. Skin ID : {ff0000}%i", GetName(cible), cible, idskin);
  56. SendClientMessage(playerid, -1, string2);
  57. return 1;
  58. }
  59. else return 1;
  60. }
  61.  
  62. CMD:avehicle(playerid, params[])
  63. {
  64. if(U_Stats[playerid][pLevel] < 12) return 1;
  65. new Float:x, Float:y, Float:z, Float:Angle, vehID, string[150];
  66. if(GetPlayerInterior(playerid) > 0) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You're in an interior");
  67. if(GetPlayerVirtualWorld(playerid)> 0) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] Wrong virtual world");
  68. if(sscanf(params,"i", vehID)) return SendClientMessage(playerid, -1, "[{82CAFF}Use{FFFFFF}] /v [vehicle_id] [400-611]");
  69. if(611<vehID || vehID<400) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] Invalid Vehicle ID [400-611]");
  70. if(IsPlayerInAnyVehicle(playerid)) { RemovePlayerFromVehicle(playerid); }
  71. GetPlayerPos(playerid, x, y, z);
  72. GetPlayerFacingAngle(playerid, Angle);
  73. vehID = CreateVehicle(vehID, x, y, z, Angle, -1, -1, -1);
  74. PutPlayerInVehicle(playerid, vehID, 0);
  75. format(string, sizeof(string), "[{ff0000}Admin{FFFFFF}] You have spawned an vehicle (Model : %i | ID : %i)", GetVehicleModel(vehID), vehID);
  76. SendClientMessage(playerid, -1, string);
  77. return 1;
  78. }
  79.  
  80. CMD:aengine(playerid, params[])
  81. {
  82. if(U_Stats[playerid][pLevel] < 12) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You're not high admin enough.");
  83. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You're not in a vehicle.");
  84. if(GetPlayerVehicleSeat(playerid) != 0) return SendClientMessage(playerid, -1, "{FFFFFF}[{82CAFF}Error{FFFFFF}] You're not the driver.");
  85. new engine, lights, alarm, doors, bonnet, boot, objective;
  86. GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
  87. SetVehicleParamsEx(GetPlayerVehicleID(playerid), VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective);
  88. return 1;
  89. }
  90.  
  91. //------------------------------------------------------------------------------------------------
  92. // ==============================================================================================
  93. // Los Angeles Police Department | Commands
  94. // ==============================================================================================
  95. //------------------------------------------------------------------------------------------------
  96. new bool:IsOnDuty[MAX_PLAYERS] = false;
  97.  
  98. CMD:duty(playerid,params[])
  99. {
  100. if(!LawE(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You are not allowed to use this command");
  101. //if(!IsPlayerInRangeOfPoint(playerid, range, x, y, z)) return SendClientMessage(playerid, -1, "[{82CAFF}Infomation{FFFFFF}] You must be at the comico'");;
  102. if(IsOnDuty[playerid] == false)
  103. {
  104. new str[128];
  105. IsOnDuty[playerid] = true;
  106. SendClientMessage(playerid, -1, "[{82CAFF}Infomation{FFFFFF}] You are now on duty");
  107. format(str, sizeof(str), "* %s take his badge, weapon and radio.", GetName(playerid));
  108. ProxDetector(15, playerid, str, 0xCC56CCFF);
  109. SetPlayerArmour(playerid, 100.0);
  110. GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
  111. GivePlayerWeapon(playerid, WEAPON_NITESTICK, 1);
  112. GivePlayerWeapon(playerid, WEAPON_SPRAYCAN, 1000);
  113. return 1;
  114. }
  115. else
  116. {
  117. new str[128];
  118. IsOnDuty[playerid] = false;
  119. SendClientMessage(playerid, -1, "[{82CAFF}Infomation{FFFFFF}] You are no longer on duty");
  120. format(str, sizeof(str), "* %s put his badge, weapon, radio into his locker.", GetName(playerid));
  121. ProxDetector(15, playerid, str, 0xCC56CCFF);
  122. SetPlayerArmour(playerid, 0.0);
  123. ResetPlayerWeapons(playerid);
  124. return 1;
  125. }
  126. }
  127.  
  128.  
  129. //------------------------------------------------------------------------------------------------
  130.  
  131. CMD:m(playerid, params[])
  132. {
  133. if(!LawE(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You are not allowed to use this command");
  134. if(!duty(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You need be on duty");
  135. if(U_Stats[playerid][pFaction] != 1 && U_Stats[playerid][pFaction] != 2) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You aren't allowed to use this command");
  136. new text[150];
  137. if(sscanf(params, "s[149]", text)) return SendClientMessage(playerid, -1, "[{82CAFF}Use{FFFFFF}] /m [Message]");
  138. format(text, sizeof(text), "{ff0000}((%s | %s)) {FFFFFF}%s", GetName(playerid), Factions[U_Stats[playerid][pFaction]-1][fShortName], text);
  139. ProxDetector(30, playerid, text, -1);
  140. return 1;
  141. }
  142.  
  143.  
  144. //------------------------------------------------------------------------------------------------
  145.  
  146. CMD:r(playerid, params[])
  147. {
  148. if(!LawE(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You are not allowed to use this command");
  149. if(!duty(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You need be on duty");
  150. new text[150];
  151. if(sscanf(params, "s[149]", text)) return SendClientMessage(playerid, -1, "[{82CAFF}Use{FFFFFF}] /r [Message]");
  152. foreach(new i : Player)
  153. {
  154. if(U_Stats[playerid][pFaction] != U_Stats[i][pFaction]) continue;
  155. format(text, sizeof(text), "(Radio) %s : %s", GetName(playerid), text);
  156. SendClientMessage(i, 0x336BA3FF, text);
  157. }
  158. return 1;
  159. }
  160.  
  161. //------------------------------------------------------------------------------------------------
  162.  
  163. CMD:d(playerid, params[])
  164. {
  165. if(!LawE(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You are not allowed to use this command");
  166. if(!duty(playerid)) return SendClientMessage(playerid, -1, "[{82CAFF}Error{FFFFFF}] You need be on duty");
  167. new text[150];
  168. if(sscanf(params, "s[149]", text)) return SendClientMessage(playerid, -1, "[{82CAFF}Use{FFFFFF}] /d (regional) [Message]");
  169. foreach(new i : Player)
  170. {
  171. if(U_Stats[playerid][pFaction] != U_Stats[i][pFaction]) continue;
  172. format(text, sizeof(text), "(%s) %s %s : %s", Factions[U_Stats[playerid][pFaction]-1][fShortName], U_Stats[playerid][pRank], GetName(playerid), text);
  173. SendClientMessage(i, 0xe62e00FF, text);
  174. }
  175. return 1;
  176. }
  177.  
  178. //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment