Advertisement
Guest User

Untitled

a guest
Jul 27th, 2012
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.48 KB | None | 0 0
  1. #include <a_samp>
  2. #include <core>
  3. #include <float>
  4. #define ADMINFS_MESSAGE_COLOR 0xFF444499
  5. #define PM_INCOMING_COLOR 0xFFFF22AA
  6. #define PM_OUTGOING_COLOR 0xFFCC2299
  7. #pragma tabsize 0
  8. #define COLOR_GREY 0xAFAFAFAA
  9. #define COLOR_GREEN 0x33AA33AA
  10. #define COLOR_RED 0xAA3333AA
  11. #define COLOR_ULTRARED 0xAA3333AA
  12. #define COLOR_YELLOW 0xFFFF00AA
  13. #define COLOR_WHITE 0xFFFFFFAA
  14. #define COLOR_BLUE 0x0000FFAA
  15. #define COLOR_BROWN 0x993300AA
  16. #define COLOR_ORANGE 0xFF9933AA
  17. #define COLOR_CYAN 0x99FFFFAA
  18. #define COLOR_PINK 0xFF66FFAA
  19. #define COLOR_BLACK 0x2C2727AA
  20. #define COLOR_LIGHTCYAN 0xAAFFCC33
  21. #define COLOR_LEMON 0xDDDD2357
  22. #define COLOR_AQUA 0x7CFC00AA
  23. #define COLOR_WHITEYELLOW 0xFFE87DFF
  24. #define COLOR_BLUEAQUA 0x7E60FFFF
  25. #define COLOR_DARKBLUE 0x15005EFF
  26. #define COLOR_ALIEN 0x90FF87FF
  27.  
  28. #define COLOR_GREY 0xAFAFAFAA
  29. #define COLOR_GREEN 0x33AA33AA
  30. #define COLOR_YELLOW 0xFFFF00AA
  31. #define COLOR_LIGHTBLUE 0x00D0F6AA
  32. #define COLOR_PURPLE 0xA600F6AA
  33. #define COLOR_TUT 0xF6C861AA
  34. #define COLOR_ROYAL 0x00C1F6AA
  35. #define COLOR_CWHITE 0xE0FFFFAA
  36.  
  37. #define COLOR_GOLD 0xB8860BAA
  38. #define COLOR_IRAN 0x15005EFF
  39. #define COLOR_America 0x90FF87FF
  40. #define COLOR_JAPAN 0xB8860BAA
  41. #define KICK_COLOR 0xFF0000FF
  42. #define COLOR_GANGGREEN 0x00FF0096
  43. #define COLOR_BLACK 0x2C2727AA
  44. #define COLOR_SBLUE 0x00BFFFAA
  45. #define INACTIVE_PLAYER_ID 255
  46. #define GIVECASH_DELAY 5000
  47. #define NUMVALUES 4
  48. #define TEAM_IRAN 1
  49. #define TEAM_America 2
  50. #define TEAM_JAPAN 3
  51. #define WELCOME 2011
  52. new KillerID[MAX_PLAYERS];
  53. new bool: PlayerDied[MAX_PLAYERS];
  54. forward MoneyGrubScoreUpdate();
  55. forward Givecashdelaytimer(playerid);
  56. forward GameModeExitFunc();
  57. forward SendPlayerFormattedText(playerid, const str[], define);
  58. forward public SendAllFormattedText(playerid, const str[], define);
  59. enum SavePosENUM { Float:sX, Float:sY, Float:sZ, Float:sA, SavedPos };
  60. new SavePos[MAX_PLAYERS][SavePosENUM];
  61. new SeTSpaWns[MAX_PLAYERS];
  62. new gTeam[MAX_PLAYERS];
  63. new gActivePlayers[MAX_PLAYERS];
  64. new gLastGaveCash[MAX_PLAYERS];
  65. forward Nupdate ();
  66. new Ntimer;
  67. new Text:NEWS_TEXTDRAW;
  68. new news[][] =
  69. {
  70. "~y~/Help",
  71. "~y~/Commands",
  72. "~y~/Rules",
  73. "~y~/Credits"
  74. };
  75.  
  76. #define RANK_NEWBIE 0
  77. #define RANK_BABY_KILLA 1
  78. #define RANK_SOLDIER 2
  79. #define RANK_GANGSTA 3
  80. #define RANK_UNDERBOSS 4
  81. #define RANK_BOSS 5
  82.  
  83. new Text:Newbie;
  84. new Text:BabyKilla;
  85. new Text:Soldier;
  86. new Text:Gangsta;
  87. new Text:Underboss;
  88. new Text:Boss;
  89. new gPlayerLogged[MAX_PLAYERS];
  90. new pRank[MAX_PLAYERS];
  91. main()
  92. {
  93. print("\n----------------------------------");
  94. print(" Gang Wars Game Mode ");
  95. print(" By Vexer \n");
  96. print("----------------------------------\n");
  97. }
  98. public OnPlayerConnect(playerid)
  99. {
  100. new player[MAX_PLAYER_NAME];
  101. GetPlayerName(playerid, player, sizeof(player));
  102. new string[50];
  103. format(string, sizeof(string), "Welcome '%s', enjoy your stay !", player);
  104. SendClientMessage(playerid, COLOR_GREEN, string);
  105. SendPlayerFormattedText(playerid, "Type /help to get started", 0);
  106. SendPlayerFormattedText(playerid, "Don't forgot login n register", 0);
  107. SendPlayerFormattedText(playerid, "This gamemode is scripted by Vexer, Rank System v.1 by max team , LuX AdminScript System v1.3 By LuxurioN", 0);
  108. SendPlayerFormattedText(playerid, "Please enjoy yourself!", 0);
  109. pRank[playerid] = 0;
  110. gPlayerLogged[playerid] = 1;
  111. TextDrawShowForPlayer(playerid, NEWS_TEXTDRAW);
  112. gActivePlayers[playerid]++;
  113. gLastGaveCash[playerid] = GetTickCount();
  114. SetPlayerMapIcon( playerid, 0, 214.194396,1863.726440,13.140625, 58, 0 );
  115. SetPlayerMapIcon( playerid, 1, -228.306442,2729.432861,62.687500, 59, 0 );
  116. SetPlayerMapIcon( playerid, 2, -1309.324707,2494.259033,89.867187, 60, 0 );
  117. SetPlayerMapIcon( playerid, 3, 384.733917,2458.126708,16.500000, 6, 0 );
  118. return 1;
  119. }
  120. public Nupdate (){static Number = 0;TextDrawSetString(NEWS_TEXTDRAW, news[Number++]);TextDrawShowForAll(NEWS_TEXTDRAW);if(Number == sizeof(news)) Number = 0;return 1;}
  121. public OnPlayerDisconnect(playerid)
  122. {
  123. gActivePlayers[playerid]--;
  124. }
  125. public OnPlayerDeath(playerid, killerid, reason)
  126. {
  127. if(PlayerDied[playerid] == true)
  128. {
  129. PlayerDied[playerid] = false;
  130. if(KillerID[playerid] != INVALID_PLAYER_ID)
  131. SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
  132. ResetPlayerWeapons(playerid);
  133. TogglePlayerSpectating(playerid,1);
  134. SendDeathMessage(killerid,playerid,reason);
  135. SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  136. SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
  137. GivePlayerMoney(killerid, 1000);
  138. GivePlayerMoney(playerid, -1000);
  139. PlayerSpectatePlayer(playerid,killerid);
  140. SetTimerEx("spawn",10000,1, "i", playerid);
  141. }
  142. else
  143. {
  144. TogglePlayerSpectating(playerid, 0);
  145. }
  146. new string[256];
  147.  
  148. if(GetPlayerScore(killerid) == 5) // Amount of required kills to get rank 1 *Baby Killa'*
  149. {
  150. GetPlayerName(killerid, string, sizeof(string) );
  151. format(string, sizeof(string), ">> %s advanced to rank *Baby Killa'* by killing %d players", string, GetPlayerScore(killerid) );
  152. SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  153. pRank[playerid] = 1;
  154. }
  155. else if(GetPlayerScore(killerid) == 25) // Amount of required kills to get rank 2 *Soldier*
  156. {
  157. GetPlayerName(killerid, string, sizeof(string) );
  158. format(string, sizeof(string), ">> %s advanced to rank *Soldier* by killing %d players", string, GetPlayerScore(killerid));
  159. SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  160. pRank[playerid] = 2;
  161. }
  162. else if(GetPlayerScore(killerid) == 50) // Amount of required kills to get rank 3 *Gangsta'*
  163. {
  164. GetPlayerName(killerid, string, sizeof(string) );
  165. format(string, sizeof(string), ">> %s advanced to rank *Gangsta'* by killing %d players", string, GetPlayerScore(killerid));
  166. SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  167. pRank[playerid] = 3;
  168. }
  169. else if(GetPlayerScore(killerid) == 150) // Amount of required kills to get rank 4 *Underboss*
  170. {
  171. GetPlayerName(killerid, string, sizeof(string) );
  172. format(string, sizeof(string), ">> %s advanced to rank *UnderBoss* by killing %d players", string, GetPlayerScore(killerid));
  173. SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  174. pRank[playerid] = 4;
  175. }
  176. else if(GetPlayerScore(killerid) == 300) // Amount of required kills to get rank 5 *Tha' Boss*
  177. {
  178. GetPlayerName(killerid, string, sizeof(string) );
  179. format(string, sizeof(string), ">> %s advanced to rank *The Boss* by killing %d players", string, GetPlayerScore(killerid));
  180. SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  181. pRank[playerid] = 5;
  182. }
  183. return 1;
  184. }
  185. forward spawn(playerid);
  186. public spawn(playerid)
  187. {
  188. TogglePlayerSpectating(playerid, 0);
  189. }
  190. public OnPlayerCommandText(playerid, cmdtext[])
  191. {
  192. new string[256];
  193. new playermoney;
  194. new sendername[MAX_PLAYER_NAME];
  195. new giveplayer[MAX_PLAYER_NAME];
  196. new cmd[256];
  197. new giveplayerid, moneys, idx;
  198. new tmp[256];
  199. new Message[256];
  200. new gMessage[256];
  201. new pName[MAX_PLAYER_NAME+1];
  202. new iName[MAX_PLAYER_NAME+1];
  203.  
  204.  
  205. cmd = strtok(cmdtext, idx);
  206.  
  207.  
  208. if(strcmp(cmdtext, "/rankinfo", true)==0)
  209. {
  210. SendClientMessage(playerid,COLOR_TUT, ".........:::: Rank Info Centre ::::........");
  211. SendClientMessage(playerid,COLOR_WHITE, "Rank 0 - *Newbie* (0 kills required)");
  212. SendClientMessage(playerid,COLOR_WHITE, "Rank 1 - *Baby Killa'* (5 kills required)");
  213. SendClientMessage(playerid,COLOR_WHITE, "Rank 2 - *Soldier* (25 kills required)");
  214. SendClientMessage(playerid,COLOR_WHITE, "Rank 3 - *Gangsta'* (50 kills required)");
  215. SendClientMessage(playerid,COLOR_WHITE, "Rank 4 - *UnderBoss* (150 kills required)");
  216. SendClientMessage(playerid,COLOR_WHITE, "Rank 5 - *Tha' Boss* (300 kills required)");
  217. return 1;
  218. }
  219.  
  220. if (strcmp("/myrank", cmdtext, true) == 0)
  221. {
  222. if(IsPlayerConnected(playerid))
  223. {
  224. new rankid = pRank[playerid];
  225. GetPlayerName(playerid, pName, sizeof(pName));
  226. new rank[20];
  227. if(pRank[playerid] == 0) { rank = "Newbie"; }
  228. else if(pRank[playerid] == 1) { rank = "Baby Killa'"; }
  229. else if(pRank[playerid] == 2) { rank = "Soldier"; }
  230. else if(pRank[playerid] == 3) { rank = "Gangsta'"; }
  231. else if(pRank[playerid] == 4) { rank = "Underboss"; }
  232. else if(pRank[playerid] == 5) { rank = "Tha' Boss"; }
  233.  
  234. format(string, sizeof(string), "*** %s's Rank Info ***",pName);
  235. SendClientMessage(playerid, COLOR_ROYAL,string);
  236. format(string, sizeof(string), "Your curent rank is %d (%s) with %d score",rankid,rank,GetPlayerScore(playerid));
  237. SendClientMessage(playerid, COLOR_CWHITE,string);
  238. }
  239. return 1;
  240. }
  241. if(strcmp(cmdtext, "/credits", true) == 0)
  242. {
  243. PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
  244. ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Credits","Gamemode By Vexer\nRank System v.1 (by: max team)\nLuX AdminScript System v1.3 By LuxurioN","OK","Cancel");
  245. return 1;
  246. }
  247. if (strcmp("/help", cmdtext, true, 10) == 0)
  248. {
  249. ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Help Menu","/Commands\n/Rules\n/Objective\n/Credits","OK","Cancel");
  250. return 1;
  251. }
  252. if (strcmp("/objective", cmdtext, true, 10) == 0)
  253. {
  254. ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Objectiv's","Objective:\nThis Server is DM!\nHere 3 Teams\nWho Will Fight\nPlayers have to fight the opponent to get score and money.","OK","Cancel");
  255. return 1;
  256. }
  257.  
  258. if(strcmp(cmd, "/Rules", true) == 0)
  259. {
  260. ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Server Rules!","Don't use hacks\nRespect all (admins) n player\nDon't kill your team\nDon't car jacking","OK","Cancel");
  261. return 1;
  262. }
  263. if(strcmp(cmd, "/Commands", true) == 0)
  264. {
  265. ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Player Commands","/Report\n/Kill\n/pm\n/class\n/getid\n/nrg\n/sp\n/lp\n/(un)lock\n/parachute\n/bombme\n/me\n/rankinfo\n/myrank\n/anims","OK","Cancel");
  266. return 1;
  267. }
  268. if(strcmp(cmdtext, "/class",true)==0)
  269. {
  270. ForceClassSelection(playerid);
  271. SendClientMessage(playerid, COLOR_ULTRARED,"[CLASS]> You have been forced to the class selection");
  272. SetPlayerHealth(playerid, 0.00);
  273. return 1;
  274. }
  275. if(strcmp(cmdtext, "/kill",true)==0)
  276. {
  277. SetPlayerHealth(playerid, 0.00);
  278. return 1;
  279. }
  280. if(!strcmp(cmd, "/me",true) || !strcmp(cmd, "/im",true))
  281. {
  282. new dir[256];
  283. dir = strtok(cmdtext, idx);
  284. strmid(tmp, cmdtext, 4, strlen(cmdtext));
  285. if(!strlen(dir))
  286. {
  287. SendClientMessage(playerid,COLOR_PINK,"[USAGE]> /me [Message/Action]");
  288. return 1;
  289. }
  290. dir = strtok(cmdtext, idx);
  291. GetPlayerName(playerid, sendername, sizeof(sendername));
  292. format(string, sizeof(string), "==> %s %s", sendername, tmp);
  293. SendClientMessageToAll(COLOR_RED,string);
  294. print(string);
  295. return 1;
  296. }
  297. //------------------------------------------------------------------------------
  298. if(strcmp(cmd,"/getid",true) == 0 || strcmp(cmd, "/id", true) == 0)
  299. {
  300. tmp = strtok(cmdtext, idx);
  301. if(!strlen(tmp))
  302. {
  303. SendClientMessage(playerid,COLOR_RED,"Correct Usage: /getid [part from the nick]");
  304. return 1;
  305. }
  306. format(string,sizeof(string),"Searched for: \"%s\": ",tmp);
  307. SendClientMessage(playerid,COLOR_RED,string);
  308. new found=0;
  309. for(new i=0; i <= MAX_PLAYERS; i++)
  310. {
  311. if(IsPlayerConnected(i))
  312. {
  313. new foundname[MAX_PLAYER_NAME];
  314. GetPlayerName(i, foundname, MAX_PLAYER_NAME);
  315. new namelen = strlen(foundname);
  316. new bool:searched=false;
  317. for(new pos=0; pos <= namelen; pos++)
  318. {
  319. if(searched != true)
  320. {
  321. if(strfind(foundname,tmp,true) == pos)
  322. {
  323. found++;
  324. format(string,sizeof(string),"%d. %s (ID %d)",found,foundname,i);
  325. SendClientMessage(playerid, COLOR_GREEN ,string);
  326. searched = true;
  327. }
  328. }
  329. }
  330. }
  331. }
  332. return 1;
  333. }
  334. if (strcmp(cmdtext, "/bombme", true)==0)
  335. {
  336. new Float:X, Float:Y, Float:Z;
  337. GetPlayerPos(playerid, X, Y, Z);
  338. CreateExplosion(X,Y,Z-3,7,100);
  339. CreateExplosion(X,Y,Z-3,7,100);
  340. CreateExplosion(X,Y,Z-3,7,100);
  341. CreateExplosion(X,Y,Z-3,7,100);
  342. SendClientMessage(playerid, COLOR_ULTRARED, "[LOL]> You have exploded yourself.");
  343. SetPlayerHealth(playerid, 50.0);
  344. GameTextForPlayer(playerid, "~r~Zbom",1200,5);
  345. return 1;
  346. }
  347. if (!strcmp(cmdtext, "/chute", true) || !strcmp(cmdtext, "/parachute", true) || !strcmp(cmdtext, "/pc", true))
  348. {
  349. GivePlayerWeapon(playerid, 46, 1);
  350. return 1;
  351. }
  352. if(strcmp(cmd, "/givecash", true) == 0) {
  353.  
  354. tmp = strtok(cmdtext, idx);
  355.  
  356. if(!strlen(tmp)) {
  357. SendClientMessage(playerid, COLOR_WHITE, "AmericaGE: /givecash [playerid] [amount]");
  358. return 1;
  359. }
  360. giveplayerid = strval(tmp);
  361.  
  362. tmp = strtok(cmdtext, idx);
  363. if(!strlen(tmp)) {
  364. SendClientMessage(playerid, COLOR_WHITE, "AmericaGE: /givecash [playerid] [amount]");
  365. return 1;
  366. }
  367. moneys = strval(tmp);
  368.  
  369. //printf("givecash_command: %d %d",giveplayerid,moneys);
  370.  
  371.  
  372. if (IsPlayerConnected(giveplayerid)) {
  373. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  374. GetPlayerName(playerid, sendername, sizeof(sendername));
  375. playermoney = GetPlayerMoney(playerid);
  376. if (moneys > 0 && playermoney >= moneys) {
  377. GivePlayerMoney(playerid, (0 - moneys));
  378. GivePlayerMoney(giveplayerid, moneys);
  379. format(string, sizeof(string), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
  380. SendClientMessage(playerid, COLOR_YELLOW, string);
  381. format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
  382. SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  383. printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
  384. }
  385. else {
  386. SendClientMessage(playerid, COLOR_YELLOW, "Invalid transaction amount.");
  387. }
  388. }
  389. else {
  390. format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  391. SendClientMessage(playerid, COLOR_YELLOW, string);
  392. }
  393. return 1;
  394. }
  395.  
  396. // PROCESS OTHER COMMANDS
  397. if(strcmp("/pm", cmd, true) == 0)
  398. {
  399. tmp = strtok(cmdtext,idx);
  400.  
  401. if(!strlen(tmp) || strlen(tmp) > 5) {
  402. SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /pm (id) (message)");
  403. return 1;
  404. }
  405.  
  406. new id = strval(tmp);
  407.  
  408.  
  409. if(!strlen(gMessage)) {
  410. SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /pm (id) (message)");
  411. return 1;
  412. }
  413.  
  414. if(!IsPlayerConnected(id)) {
  415. SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/pm : Bad player ID");
  416. return 1;
  417. }
  418.  
  419. if(playerid != id) {
  420. GetPlayerName(id,iName,sizeof(iName));
  421. GetPlayerName(playerid,pName,sizeof(pName));
  422. format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
  423. SendClientMessage(playerid,PM_OUTGOING_COLOR,Message);
  424. format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
  425. SendClientMessage(id,PM_INCOMING_COLOR,Message);
  426. PlayerPlaySound(id,1085,0.0,0.0,0.0);
  427.  
  428. printf("PM: %s",Message);
  429.  
  430. }
  431. else {
  432. SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"You cannot PM yourself");
  433. }
  434. return 1;
  435. }
  436. if(strcmp(cmdtext, "/nrg", true) == 0)
  437. {
  438. new Float:X, Float:Y, Float:Z;
  439. GetPlayerPos(playerid, X, Y, Z);
  440. if(GetPlayerMoney(playerid) >= 30000)
  441. {
  442. new mnrg[MAX_PLAYERS];
  443. GivePlayerMoney(playerid, -60000);
  444. mnrg[playerid] = CreateVehicle(522, X, Y, Z + 1, 90.0, -1, -1, 100000000);
  445. PutPlayerInVehicle(playerid, mnrg[playerid], 0);
  446. AddVehicleComponent(mnrg[playerid], 1079);
  447. SendClientMessage(playerid, 0xFFFF00AA, "Modded NRG-500, bought for 30000$ !");
  448. }
  449. else if(GetPlayerMoney(playerid) < 60000)
  450. {
  451. SendClientMessage(playerid, 0xEB000FFF, "ERROR: Not enought Moneys, 30000$ needed !");
  452. }
  453. return 1;
  454. }
  455. //sp lp
  456. //------------------------------------------------------------------------------
  457. if(!strcmp(cmdtext, "/spos",true) || !strcmp(cmdtext,"/sp",true))
  458. {
  459. if (IsPlayerInAnyVehicle(playerid))
  460. {
  461. GetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  462. GetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
  463. }else {
  464. GetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  465. GetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
  466. }SavePos[playerid][SavedPos] = 1;
  467. return SendClientMessage(playerid, COLOR_WHITE,"Position saved, use /lp to go back.");
  468. }
  469.  
  470. //------------------------------------------------------------------------------
  471. if(!strcmp(cmdtext, "/lp",true) || !strcmp(cmdtext,"/lpos",true))
  472. {
  473. SetCameraBehindPlayer(playerid);
  474. if (SavePos[playerid][SavedPos] == 0) return SendClientMessage(playerid, COLOR_WHITE, "[SERVER]> Use /sp First.");
  475. if (IsPlayerInAnyVehicle(playerid))
  476. {
  477. SetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  478. SetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
  479. } else {
  480. SetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  481. SetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
  482. }
  483. return SendClientMessage(playerid, COLOR_WHITE, "Position restored");
  484. }
  485. //car lock unlock
  486. //------------------------------------------------------------------------------
  487. if (strcmp(cmdtext, "/lock", true)==0)
  488. {
  489. if(IsPlayerInAnyVehicle(playerid))
  490. {
  491. new State=GetPlayerState(playerid);
  492. if(State!=PLAYER_STATE_DRIVER)
  493. {
  494. SendClientMessage(playerid,0xFFFF00AA,"You can only lock the doors as the driver.");
  495. return 1;
  496. }
  497. new i;
  498. for(i=0;i<MAX_PLAYERS;i++)
  499. {
  500. if(i != playerid)
  501. {
  502. SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
  503. }
  504. }
  505. SendClientMessage(playerid, 0xFFFF00AA, "Vehicle locked!");
  506. new Float:pX, Float:pY, Float:pZ;
  507. GetPlayerPos(playerid,pX,pY,pZ);
  508. PlayerPlaySound(playerid,1056,pX,pY,pZ);
  509. }
  510. else
  511. {
  512. SendClientMessage(playerid, 0xFFFF00AA, "You're not in a vehicle!");
  513. }
  514. return 1;
  515. }
  516.  
  517. //------------------------------------------------------------------------------
  518. if (strcmp(cmdtext, "/unlock", true)==0)
  519. {
  520. if(IsPlayerInAnyVehicle(playerid))
  521. {
  522. new State=GetPlayerState(playerid);
  523. if(State!=PLAYER_STATE_DRIVER)
  524. {
  525. SendClientMessage(playerid,0xFFFF00AA,"You can only unlock the doors as the driver.");
  526. return 1;
  527. }
  528. new i;
  529. for(i=0;i<MAX_PLAYERS;i++)
  530. {
  531. SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
  532. }
  533. SendClientMessage(playerid, 0xFFFF00AA, "Vehicle unlocked!");
  534. new Float:pX, Float:pY, Float:pZ;
  535. GetPlayerPos(playerid,pX,pY,pZ);
  536. PlayerPlaySound(playerid,1057,pX,pY,pZ);
  537. }
  538. else
  539. {
  540. SendClientMessage(playerid, 0xFFFF00AA, "You're not in a vehicle!");
  541. }
  542. return 1;
  543. }
  544. /////////
  545.  
  546. return 0;
  547. }
  548.  
  549.  
  550.  
  551. public OnPlayerSpawn(playerid)
  552. {
  553. SetPlayerInterior(playerid,0);
  554. TogglePlayerClock(playerid,0);
  555. SetPlayerToTeamColor(playerid);
  556. SetWeather(32);
  557.  
  558. TextDrawShowForPlayer(playerid, Newbie);
  559. TextDrawShowForPlayer(playerid, BabyKilla);
  560. TextDrawShowForPlayer(playerid, Soldier);
  561. TextDrawShowForPlayer(playerid, Gangsta);
  562. TextDrawShowForPlayer(playerid, Underboss);
  563. TextDrawShowForPlayer(playerid, Boss);
  564.  
  565. if(gPlayerLogged[playerid] == 0) { // If not logged in
  566. TextDrawHideForPlayer(playerid, Newbie);
  567. TextDrawHideForPlayer(playerid, BabyKilla);
  568. TextDrawHideForPlayer(playerid, Soldier);
  569. TextDrawHideForPlayer(playerid, Gangsta);
  570. TextDrawHideForPlayer(playerid, Underboss);
  571. TextDrawHideForPlayer(playerid, Boss);
  572. }
  573.  
  574. if(pRank[playerid] == 0) { // Newbie
  575. SetPlayerHealth(playerid, 50.0);
  576. GivePlayerWeapon(playerid, 22, 300);
  577. GivePlayerWeapon(playerid, 17, 500);
  578. TextDrawHideForPlayer(playerid, BabyKilla);
  579. TextDrawHideForPlayer(playerid, Soldier);
  580. TextDrawHideForPlayer(playerid, Gangsta);
  581. TextDrawHideForPlayer(playerid, Underboss);
  582. TextDrawHideForPlayer(playerid, Boss);
  583. }
  584.  
  585. else if(pRank[playerid] == 1) { // Baby Killa
  586. SetPlayerHealth(playerid, 60.0);
  587. SetPlayerArmour(playerid, 15.0);
  588. GivePlayerWeapon(playerid, 23, 300);
  589. GivePlayerWeapon(playerid, 17, 500);
  590. GivePlayerWeapon(playerid, 5, 1);
  591. TextDrawHideForPlayer(playerid, Newbie);
  592. TextDrawHideForPlayer(playerid, Soldier);
  593. TextDrawHideForPlayer(playerid, Gangsta);
  594. TextDrawHideForPlayer(playerid, Underboss);
  595. TextDrawHideForPlayer(playerid, Boss);
  596. }
  597.  
  598. else if(pRank[playerid] == 2) { // Soldier
  599. SetPlayerHealth(playerid, 70.0);
  600. SetPlayerArmour(playerid, 25.0);
  601. GivePlayerWeapon(playerid, 24, 150);
  602. GivePlayerWeapon(playerid, 5, 1);
  603. TextDrawHideForPlayer(playerid, BabyKilla);
  604. TextDrawHideForPlayer(playerid, Newbie);
  605. TextDrawHideForPlayer(playerid, Gangsta);
  606. TextDrawHideForPlayer(playerid, Underboss);
  607. TextDrawHideForPlayer(playerid, Boss);
  608. }
  609.  
  610. else if(pRank[playerid] == 3) { // Gangsta
  611. SetPlayerHealth(playerid, 80.0);
  612. SetPlayerArmour(playerid, 50.0);
  613. GivePlayerWeapon(playerid, 70200);
  614. GivePlayerWeapon(playerid, 24, 150);
  615. TextDrawHideForPlayer(playerid, BabyKilla);
  616. TextDrawHideForPlayer(playerid, Soldier);
  617. TextDrawHideForPlayer(playerid, Newbie);
  618. TextDrawHideForPlayer(playerid, Underboss);
  619. TextDrawHideForPlayer(playerid, Boss);
  620. }
  621.  
  622. else if(pRank[playerid] == 4) { // Underboss
  623. SetPlayerHealth(playerid, 100);
  624. SetPlayerArmour(playerid, 100.0);
  625. GivePlayerWeapon(playerid, 39, 100);
  626. GivePlayerWeapon(playerid, 24, 300);
  627. TextDrawHideForPlayer(playerid, BabyKilla);
  628. TextDrawHideForPlayer(playerid, Soldier);
  629. TextDrawHideForPlayer(playerid, Gangsta);
  630. TextDrawHideForPlayer(playerid, Newbie);
  631. TextDrawHideForPlayer(playerid, Boss);
  632. }
  633.  
  634. else if(pRank[playerid] == 5) { // Tha' Boss
  635. SetPlayerHealth(playerid, 100);
  636. SetPlayerArmour(playerid, 100);
  637. GivePlayerWeapon(playerid, 27, 100);
  638. GivePlayerWeapon(playerid, 24, 500);
  639. GivePlayerWeapon(playerid, 31, 500);
  640. TextDrawHideForPlayer(playerid, BabyKilla);
  641. TextDrawHideForPlayer(playerid, Soldier);
  642. TextDrawHideForPlayer(playerid, Gangsta);
  643. TextDrawHideForPlayer(playerid, Underboss);
  644. TextDrawHideForPlayer(playerid, Newbie);
  645. }
  646. return 1;
  647. }
  648. forward SetPlayerToTeamColor(playerid);
  649. public SetPlayerToTeamColor(playerid)
  650. {
  651. if (gTeam[playerid] == TEAM_IRAN)
  652. {
  653. SetPlayerColor(playerid, COLOR_IRAN);
  654. SetPlayerInterior(playerid,0);
  655. SetPlayerArmour(playerid,100);
  656. }
  657. else if (gTeam[playerid] == TEAM_America)
  658. {
  659. SetPlayerColor(playerid, COLOR_America);
  660. SetPlayerInterior(playerid,0);
  661. SetPlayerArmour(playerid,100);
  662. }
  663. else if (gTeam[playerid] == TEAM_JAPAN)
  664. {
  665. SetPlayerColor(playerid, COLOR_JAPAN);
  666. SetPlayerInterior(playerid,0);
  667. SetPlayerArmour(playerid,100);
  668. }
  669. }
  670.  
  671.  
  672. public OnPlayerRequestClass(playerid, classid)
  673. {
  674. SeTSpaWns[playerid] = 0;
  675. SetPlayerTeamFromClass(playerid, classid);
  676. SetPlayerInterior(playerid,0);
  677. SetPlayerPos(playerid, -2476.72, 1544.59, 55.46);
  678. SetPlayerFacingAngle(playerid, 1.304757);
  679. SetPlayerCameraPos(playerid, -2480.61, 1552.29, 55.43);
  680. SetPlayerCameraLookAt(playerid, -2476.72, 1544.59, 55.46);
  681. return 1;
  682. }
  683.  
  684. public OnGameModeExit(){KillTimer(Ntimer);TextDrawDestroy(NEWS_TEXTDRAW);return 1;}
  685.  
  686. public GameModeExitFunc(){GameModeExit();}
  687.  
  688. public OnGameModeInit()
  689. {
  690.  
  691. Newbie = TextDrawCreate(500, 100, "Rank: Newbie");
  692. TextDrawAlignment(Newbie, 1);
  693. TextDrawFont(Newbie, 2);
  694. TextDrawLetterSize(Newbie, 0.400, 1.000);
  695. TextDrawColor(Newbie, COLOR_WHITE);
  696. TextDrawSetOutline(Newbie, 1);
  697.  
  698. BabyKilla = TextDrawCreate(486, 100, "Rank: Baby Killa'");
  699. TextDrawAlignment(BabyKilla, 1);
  700. TextDrawFont(BabyKilla, 2);
  701. TextDrawLetterSize(BabyKilla, 0.400, 1.000);
  702. TextDrawColor(BabyKilla, COLOR_YELLOW);
  703. TextDrawSetOutline(BabyKilla, 1);
  704.  
  705. Soldier = TextDrawCreate(500, 100, "Rank: Soldier");
  706. TextDrawAlignment(Soldier, 1);
  707. TextDrawFont(Soldier, 2);
  708. TextDrawLetterSize(Soldier, 0.400, 1.000);
  709. TextDrawColor(Soldier, COLOR_GREEN);
  710. TextDrawSetOutline(Soldier, 1);
  711.  
  712. Gangsta = TextDrawCreate(500, 100, "Rank: Gangsta'");
  713. TextDrawAlignment(Gangsta, 1);
  714. TextDrawFont(Gangsta, 2);
  715. TextDrawLetterSize(Gangsta, 0.400, 1.000);
  716. TextDrawColor(Gangsta, COLOR_ROYAL);
  717. TextDrawSetOutline(Gangsta, 1);
  718.  
  719. Underboss = TextDrawCreate(483, 100, "Rank: Underboss");
  720. TextDrawAlignment(Underboss, 1);
  721. TextDrawFont(Underboss, 2);
  722. TextDrawLetterSize(Underboss, 0.400, 1.000);
  723. TextDrawColor(Underboss, COLOR_PURPLE);
  724. TextDrawSetOutline(Underboss, 1);
  725.  
  726. Boss = TextDrawCreate(490, 100, "Rank: Tha' Boss");
  727. TextDrawAlignment(Boss, 1);
  728. TextDrawFont(Boss, 2);
  729. TextDrawLetterSize(Boss, 0.400, 1.000);
  730. TextDrawColor(Boss, COLOR_TUT);
  731. TextDrawSetOutline(Boss, 1);
  732.  
  733. Ntimer = SetTimer("Nupdate", 5000, 1);
  734. NEWS_TEXTDRAW = TextDrawCreate(321.000000,420.000000,"~y~/Commands");
  735. TextDrawUseBox(NEWS_TEXTDRAW,0);
  736. TextDrawBoxColor(NEWS_TEXTDRAW,0x00000099);
  737. TextDrawTextSize(NEWS_TEXTDRAW,0.000000,631.000000);
  738. TextDrawAlignment(NEWS_TEXTDRAW,2);
  739. TextDrawBackgroundColor(NEWS_TEXTDRAW,0x000000ff);
  740. TextDrawFont(NEWS_TEXTDRAW,1);
  741. TextDrawLetterSize(NEWS_TEXTDRAW,0.399999,1.100000);
  742. TextDrawColor(NEWS_TEXTDRAW,0xffffffff);
  743. TextDrawSetOutline(NEWS_TEXTDRAW,1);
  744. TextDrawSetProportional(NEWS_TEXTDRAW,1);
  745. TextDrawSetShadow(NEWS_TEXTDRAW,1);
  746. SetGameModeText("COD BO");
  747. UsePlayerPedAnims();
  748. AllowInteriorWeapons(1);
  749. SetWeather(32);
  750. ShowPlayerMarkers(1);
  751. ShowNameTags(1);
  752. AddPlayerClass(287,214.194396,1863.726440,13.140625,270.1425,31,3121,24,300,16,100);
  753. AddPlayerClass(285,-228.306442,2729.432861,62.687500,270.1425,31,3120,24,300,16,100);
  754. AddPlayerClass(277,-1309.324707,2494.259033,89.867187,270.1425,30,3120,24,300,16,100);
  755. // Car Spawns
  756. AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  757. AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  758. AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  759. AddStaticVehicle(432,278.9016,1950.7509,17.6532,88.9054,43,0);
  760. AddStaticVehicle(432,282.3510,1987.1381,17.6535,87.2516,43,0);
  761. AddStaticVehicle(432,278.2103,2020.6830,17.6535,98.7492,43,0);
  762. AddStaticVehicle(425,342.1974,1874.3889,18.3136,104.1868,34,0);
  763. AddStaticVehicle(425,339.5558,1855.1088,18.5525,108.6887,43,0);
  764. AddStaticVehicle(520,338.5540,1930.7616,18.7074,272.5084,0,0);
  765. AddStaticVehicle(520,358.0111,1916.5072,18.6420,266.0934,0,0);
  766. AddStaticVehicle(520,358.7953,1892.7484,18.3639,109.5348,0,0);
  767. AddStaticVehicle(520,366.4059,1960.9697,18.3639,280.4560,0,0);
  768. AddStaticVehicle(520,331.8059,1968.1923,18.3639,97.8575,0,0);
  769. AddStaticVehicle(425,343.2718,1946.3412,18.2241,274.0224,43,0);
  770. AddStaticVehicle(520,229.651931,1892.521972,17.211687,274.0224,43,0);
  771. AddStaticVehicle(432,182.544204,1909.152343,17.469060,274.0224,43,0);
  772. AddStaticVehicle(470,184.454849,1948.658813,17.396722,0.0,43,0);
  773. AddStaticVehicle(470,184.454849,1953.658813,17.396722,0.0,43,0);
  774. AddStaticVehicle(470,-224.073669,2751.190185,62.539062,274.0224,43,0);
  775. AddStaticVehicle(470,-224.073669,2755.190185,62.539062,274.0224,43,0);
  776. AddStaticVehicle(520,-197.495452,2725.493164,62.687500,280.4560,0,0);
  777. AddStaticVehicle(432,-257.033142,2701.294189,62.535140,88.2516,43,0);
  778. AddStaticVehicle(425,-294.516601,2741.593261,61.895484,100.2516,43,0);
  779. AddStaticVehicle(520,-306.612548,2676.907470,62.599357,60.2516,43,0);
  780. AddStaticVehicle(470,-1294.959960,2447.247558,88.042465,0.0,43,0);
  781. AddStaticVehicle(470,-1297.959960,2447.247558,88.042465,0.0,43,0);
  782. AddStaticVehicle(470,-1291.959960,2447.247558,88.042465,0.0,43,0);
  783. AddStaticVehicle(520,-1329.691162,2488.202148,87.046875,120.0,43,0);
  784. AddStaticVehicle(425,-1302.751953,2479.679687,87.278709,0.0,43,0);
  785. AddStaticVehicle(432,-1298.280273,2504.918212,86.957275,88.2516,43,0);
  786. AddStaticPickup(371, 15, -320.800262,2742.728759,62.952674);
  787. AddStaticPickup(370, 15, 384.733917,2474.126708,16.500000);
  788. AddStaticPickup(355, 15, 384.733917,2472.126708,16.500000);
  789. AddStaticPickup(352, 15, 384.733917,2470.126708,16.500000);
  790. AddStaticPickup(351, 15, 384.733917,2468.126708,16.500000);
  791. AddStaticPickup(350, 15, 384.733917,2466.126708,16.500000);
  792. AddStaticPickup(349, 15, 384.733917,2464.126708,16.500000);
  793. AddStaticPickup(348, 15, 384.733917,2462.126708,16.500000);
  794. AddStaticPickup(344, 15, 384.733917,2460.126708,16.500000);
  795. AddStaticPickup(342, 15, 384.733917,2458.126708,16.500000);
  796. AddStaticPickup(359, 15, 384.733917,2456.126708,16.500000);
  797. AddStaticPickup(358, 15, 384.733917,2454.126708,16.500000);
  798. AddStaticPickup(357, 15, 384.733917,2452.126708,16.500000);
  799. AddStaticPickup(356, 15, 384.733917,2450.126708,16.500000);
  800. AddStaticPickup(366, 15, 384.733917,2448.126708,16.500000);
  801. AddStaticPickup(367, 15, 384.733917,2446.126708,16.500000);
  802. AddStaticPickup(365, 15, 384.733917,2444.126708,16.500000);
  803. AddStaticPickup(364, 15, 384.733917,2442.126708,16.500000);
  804. AddStaticPickup(363, 15, 384.733917,2440.126708,16.500000);
  805. SetTimer("MoneyGrubScoreUpdate", 1000, 1);
  806.  
  807. CreateObject(5005, -254.9398, 2629.4697, 65.4919, 0.0000, 0.0000, 0.0000);
  808. CreateObject(5005, -171.8070, 2712.8440, 65.4890, 0.0000, 0.0000, 270.0000);
  809. CreateObject(5005, -176.8703, 2790.9417, 64.4789, 357.4217, 0.8594, 180.0000);
  810. CreateObject(5001, -307.1126, 2746.8711, 62.5342, 0.0000, 0.0000, 202.5000);
  811. CreateObject(5005, -360.5526, 2738.1599, 64.0616, 0.0000, 0.0000, 281.2500);
  812. CreateObject(9482, -349.0363, 2646.9709, 69.9636, 0.0000, 0.0000, 337.5000);
  813. CreateObject(3279, -339.5167, 2660.0864, 62.9289, 0.0000, 0.0000, 1.7962);
  814. CreateObject(3279, -351.9811, 2723.3726, 62.4001, 0.0000, 0.0000, 1.7962);
  815. CreateObject(3279, -179.5017, 2786.7734, 61.6452, 0.0000, 0.0000, 272.4147);
  816. CreateObject(3279, -177.2514, 2633.9680, 61.9540, 0.0000, 0.0000, 176.1577);
  817. CreateObject(12911, -176.4954, 2709.1003, 61.6658, 0.0000, 0.0000, 11.2500);
  818. CreateObject(16093, -320.0561, 2740.5032, 61.5683, 0.0000, 0.0000, 0.0000);
  819. CreateObject(3268, -221.8601, 2735.1553, 61.6124, 0.0000, 0.0000, 270.0000);
  820. CreateObject(3277, -294.6788, 2720.3306, 62.1320, 0.0000, 0.0000, 0.0000);
  821. CreateObject(3277, -246.4207, 2769.7610, 62.3890, 0.0000, 0.0000, 0.0000);
  822. CreateObject(3277, -220.2349, 2666.4761, 62.3742, 0.0000, 0.0000, 0.0000);
  823. CreateObject(3267, -220.0240, 2666.2141, 62.4346, 0.0000, 0.0000, 77.9679);
  824. CreateObject(3267, -246.2458, 2769.9004, 62.3417, 0.0000, 0.0000, 77.9679);
  825. CreateObject(3267, -294.7077, 2720.5930, 62.0847, 0.0000, 0.0000, 77.9679);
  826. CreateObject(16779, -221.7522, 2735.5933, 70.1197, 0.0000, 0.0000, 0.0000);
  827. CreateObject(3386, -207.4938, 2744.3926, 61.6875, 0.0000, 0.0000, 0.0000);
  828. CreateObject(3387, -207.4999, 2743.3928, 61.6875, 0.0000, 0.0000, 0.0000);
  829. CreateObject(3387, -207.3986, 2743.7925, 61.6875, 0.0000, 0.0000, 0.0000);
  830. CreateObject(3387, -207.4974, 2742.4133, 61.6875, 0.0000, 0.0000, 0.0000);
  831. CreateObject(3386, -207.4666, 2741.4272, 61.6875, 0.0000, 0.0000, 0.0000);
  832. CreateObject(3390, -212.4124, 2726.7991, 61.6853, 0.0000, 0.0000, 270.0000);
  833. CreateObject(3391, -215.9368, 2726.8037, 61.6853, 0.0000, 0.0000, 270.0000);
  834. CreateObject(3393, -235.5252, 2732.9263, 61.6853, 0.0000, 0.0000, 180.0000);
  835. CreateObject(3786, -223.0990, 2725.8984, 63.0437, 0.0000, 87.6625, 270.0000);
  836. CreateObject(3786, -223.9230, 2725.8738, 63.0437, 0.0000, 87.6625, 270.0000);
  837. CreateObject(3786, -224.7999, 2725.9360, 63.0937, 0.0000, 87.6625, 270.0000);
  838. CreateObject(3788, -209.4488, 2739.1323, 62.2069, 0.0000, 0.0000, 180.0000);
  839. CreateObject(3788, -209.4458, 2737.6816, 62.2069, 0.0000, 0.0000, 180.0000);
  840. CreateObject(3788, -209.3231, 2735.9937, 62.2069, 0.0000, 0.0000, 180.0000);
  841. CreateObject(3788, -209.2553, 2733.9226, 62.2069, 0.0000, 0.0000, 180.0000);
  842. CreateObject(3790, -209.2686, 2739.1145, 62.3186, 0.0000, 0.0000, 0.0000);
  843. CreateObject(3795, -209.2949, 2732.0935, 62.0285, 0.0000, 0.0000, 0.0000);
  844. CreateObject(16782, -228.2192, 2725.5979, 65.3473, 0.0000, 0.0000, 90.0000);
  845. CreateObject(3390, -218.4553, 2735.3118, 61.6853, 0.0000, 0.0000, 268.2811);
  846. CreateObject(3390, -225.8240, 2735.4895, 61.6853, 0.0000, 0.0000, 268.2811);
  847. CreateObject(8263, -1274.3019, 2543.9512, 91.4514, 0.0000, 353.9839, 315.0000);
  848. CreateObject(8263, -1260.6560, 2500.6094, 89.4559, 0.0000, 0.0000, 255.3896);
  849. CreateObject(8263, -1346.3373, 2491.7375, 89.1479, 357.4217, 356.5623, 266.5623);
  850. CreateObject(8262, -1257.6318, 2448.5452, 89.6399, 0.0000, 0.0000, 281.2500);
  851. CreateObject(9482, -1324.4058, 2434.7969, 94.7742, 0.0000, 0.0000, 281.2500);
  852. CreateObject(1411, -1337.2031, 2432.9114, 90.2721, 0.0000, 0.0000, 0.0000);
  853. CreateObject(1411, -1342.5999, 2432.8882, 90.3597, 0.0000, 0.0000, 0.0000);
  854. CreateObject(1411, -1347.7378, 2432.8120, 90.8788, 0.0000, 0.0000, 0.0000);
  855. CreateObject(3279, -1336.7545, 2546.3669, 84.3876, 0.0000, 0.0000, 348.7500);
  856. CreateObject(3279, -1276.2366, 2538.0657, 86.7594, 0.0000, 0.0000, 236.2501);
  857. CreateObject(3279, -1264.9675, 2529.1968, 88.1707, 0.0000, 0.0000, 236.2501);
  858. CreateObject(3279, -1279.8213, 2451.6201, 86.3936, 0.0000, 0.0000, 168.7500);
  859. CreateObject(3279, -1346.1771, 2455.6633, 85.9918, 0.0000, 0.0000, 348.7500);
  860. CreateObject(12911, -1340.7258, 2485.4453, 86.1911, 0.0000, 0.0000, 0.0000);
  861. CreateObject(16093, -1283.4213, 2476.8713, 86.2617, 0.0000, 0.0000, 270.0000);
  862. CreateObject(4853, -1290.9688, 2515.7266, 88.3231, 0.0000, 0.0000, 292.5000);
  863. CreateObject(1252, -1340.4661, 2472.5381, 88.9848, 0.0000, 0.0000, 225.0000);
  864. CreateObject(1550, -1309.3625, 2544.3850, 87.1355, 0.0000, 0.0000, 0.0000);
  865. CreateObject(1550, -1308.8961, 2544.4812, 87.1355, 0.0000, 0.0000, 0.0000);
  866. CreateObject(1550, -1307.9420, 2543.8079, 87.1355, 0.0000, 0.0000, 0.0000);
  867. CreateObject(1550, -1309.0991, 2543.3286, 87.1355, 0.0000, 0.0000, 0.0000);
  868. CreateObject(1550, -1307.9792, 2542.8489, 87.1355, 0.0000, 0.0000, 0.0000);
  869. CreateObject(1550, -1307.3198, 2542.6135, 87.1355, 0.0000, 0.0000, 0.0000);
  870. CreateObject(1550, -1307.2151, 2543.5928, 87.1355, 0.0000, 0.0000, 0.0000);
  871. return 1;
  872. }
  873.  
  874. forward SetPlayerTeamFromClass(playerid,classid);
  875. public SetPlayerTeamFromClass(playerid, classid)
  876. {
  877. switch(classid)
  878. {
  879. case 0:
  880. {
  881. GameTextForPlayer(playerid, "~b~IRAN", 1500, 6);
  882. SetPlayerInterior(playerid,0);
  883. SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
  884. SetPlayerFacingAngle(playerid, 270.0);
  885. SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
  886. SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
  887. gTeam[playerid] = TEAM_IRAN;
  888. SetPlayerTeam(playerid,1);
  889. ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  890. }
  891. case 1:
  892. {
  893. GameTextForPlayer(playerid, "~g~~h~America", 1500, 6);
  894. SetPlayerInterior(playerid,0);
  895. SetPlayerPos(playerid,-228.306442,2729.432861,62.687500);
  896. SetPlayerFacingAngle(playerid, 270.0);
  897. SetPlayerCameraPos(playerid,-226.306442,2729.432861,62.687500);
  898. SetPlayerCameraLookAt(playerid,-228.306442,2729.432861,62.687500);
  899. gTeam[playerid] = TEAM_America;
  900. SetPlayerTeam(playerid,2);
  901. ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  902. }
  903. case 2:
  904. {
  905. GameTextForPlayer(playerid, "~b~JAPAN", 1500, 6);
  906. SetPlayerInterior(playerid,0);
  907. SetPlayerPos(playerid,-1309.324707,2494.259033,89.867187);
  908. SetPlayerFacingAngle(playerid, 357.1708);
  909. SetPlayerCameraPos(playerid, -1306.324707,2494.259033,89.867187);
  910. SetPlayerCameraLookAt(playerid, -1309.324707,2494.259033,89.867187);
  911. gTeam[playerid] = TEAM_JAPAN;
  912. SetPlayerTeam(playerid,3);
  913. ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  914. }
  915.  
  916. }
  917.  
  918. }
  919. public SendPlayerFormattedText(playerid, const str[], define)
  920. {
  921. new tmpbuf[256];
  922. format(tmpbuf, sizeof(tmpbuf), str, define);
  923. SendClientMessage(playerid, 0xFF004040, tmpbuf);
  924. }
  925.  
  926. public SendAllFormattedText(playerid, const str[], define)
  927. {
  928. new tmpbuf[256];
  929. format(tmpbuf, sizeof(tmpbuf), str, define);
  930. SendClientMessageToAll(0xFFFF00AA, tmpbuf);
  931. }
  932.  
  933. strtok(const string[], &index)
  934. {
  935. new length = strlen(string);
  936. while ((index < length) && (string[index] <= ' '))
  937. {
  938. index++;
  939. }
  940.  
  941. new offset = index;
  942. new result[20];
  943. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  944. {
  945. result[index - offset] = string[index];
  946. index++;
  947. }
  948. result[index - offset] = EOS;
  949. return result;
  950. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement