Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* I don't fuckin know what this is gonna be
- Started March 1st, 2018 4:13 PM CST
- you're mom gay*/
- #include <a_samp>
- #include <zcmd>
- #include <YSI\y_ini>
- #include <streamer>
- //Colors
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_BLACK 0x000000FF
- #define COLOR_RED 0xFF0000FF
- #define COLOR_BROWN 0x800000FF
- #define COLOR_LIME 0x00FF00FF
- #define COLOR_GREEN 0x008000FF
- #define COLOR_CYAN 0x00FFFFFF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_BLUE 0x0000FFFF
- #define COLOR_ORANGE 0xFF8000FF
- #define COLOR_PINK 0xFF00FFFF
- #define COLOR_PURPLE 0x8000FFFF
- //Gay shit
- #define PATH "/Users/%s.ini"
- //Dialogs
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- #define DIALOG_TEAM_SELECTION 5
- //Teams
- #define TEAM_USA 5000
- #define TEAM_CANADA 5001
- #define TEAM_BRITAIN 5002
- #define TEAM_AUSTRALIA 5003
- #define TEAM_RUSSIA 5004
- #define TEAM_GERMANY 5005
- #define TEAM_ITALY 5006
- #define TEAM_FRANCE 5007
- #define TEAM_CHINA 5008
- #define TEAM_INDIA 5009
- #define COLOR_USA 0x0000FFFF
- #define COLOR_CANADA 0x008000FF
- #define COLOR_BRITAIN 0xFF0000FF
- #define COLOR_AUSTRALIA 0x0080FFFF
- #define COLOR_RUSSIA 0x800000FF
- #define COLOR_GERMANY 0xFFFF00FF
- #define COLOR_ITALY 0x408080FF
- #define COLOR_FRANCE 0x80FF80FF
- #define COLOR_CHINA 0xFF8000FF
- #define COLOR_INDIA 0x0080C0FF
- #define COLOR_USA_EMBED "{0000FF}"
- #define COLOR_CANADA_EMBED "{008000}"
- #define COLOR_BRITAIN_EMBED "{FF0000}"
- #define COLOR_AUSTRALIA_EMBED "{0080FF}"
- #define COLOR_RUSSIA_EMBED "{800000}"
- #define COLOR_GERMANY_EMBED "{408080}"
- #define COLOR_ITALY_EMBED "{80FF80}"
- #define COLOR_FRANCE_EMBED "{0080C0}"
- #define COLOR_CHINA_EMBED "{FFFF00}"
- #define COLOR_INDIA_EMBED "{FF8000}"
- //Player data
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths,
- pVIP,
- pXP,
- pLevel,
- pLevelName[128],
- pTeam
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- main()
- {
- print("\n----------------------------------");
- print(" Maude Freeroam");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("MAUDE FREEROAM");
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SpawnPlayer(playerid);
- SpawnPlayerAtTeam(playerid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "-| %s has connected to the server |-", name);
- SendClientMessageToAll(COLOR_LIME, string);
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Type your password below to login.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Registering...","Type your password below to register a new account.","Register","Quit");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new DisconnectReason[3][] =
- {
- "Timeout/Crash",
- "Quit",
- "Kick/Ban"
- };
- format(string, sizeof(string), "-| %s has left the server (%s) |-", name, DisconnectReason[reason]);
- SendClientMessageToAll(COLOR_YELLOW, string);
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]);
- INI_WriteInt(File,"XP",PlayerInfo[playerid][pXP]);
- INI_WriteInt(File,"Score",PlayerInfo[playerid][pLevel]);
- INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- PlayerInfo[playerid][pDeaths]++;
- if(killerid != INVALID_PLAYER_ID)
- {
- new string1[128];
- new string2[128];
- format(string1, sizeof(string1), "You have been killed by %u!", killerid);
- format(string2, sizeof(string2), "You have killed %u, and received $1000!", playerid);
- SendClientMessage(playerid, COLOR_RED, string1);
- SendClientMessage(killerid, COLOR_LIME, string2);
- PlayerInfo[killerid][pKills]++;
- GivePlayerXP(killerid, 100);
- GivePlayerMoney(killerid, 1000);
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering...","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"VIP",0);
- INI_WriteInt(File,"XP",0);
- INI_WriteInt(File,"Level",0);
- INI_Close(File);
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"You have registered, please select your team.",""COLOR_USA_EMBED"United States\n"COLOR_CANADA_EMBED"Canada\n"COLOR_BRITAIN_EMBED"Britain\n"COLOR_AUSTRALIA_EMBED"Australia\n"COLOR_RUSSIA_EMBED"Russia\n"COLOR_CHINA_EMBED"China\n"COLOR_GERMANY_EMBED"Germany\n"COLOR_ITALY_EMBED"Italy\n"COLOR_INDIA_EMBED"India\n"COLOR_FRANCE_EMBED"France","Select","");
- }
- }
- case DIALOG_LOGIN:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"Success!","You have successfully logged in!","Ok","");
- SpawnPlayer(playerid);
- SpawnPlayerAtTeam(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- if(dialogid == DIALOG_TEAM_SELECTION)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: AltSetPlayerTeam(playerid, TEAM_USA);
- case 1: AltSetPlayerTeam(playerid, TEAM_CANADA);
- case 2: AltSetPlayerTeam(playerid, TEAM_BRITAIN);
- case 3: AltSetPlayerTeam(playerid, TEAM_AUSTRALIA);
- case 4: AltSetPlayerTeam(playerid, TEAM_RUSSIA);
- case 5: AltSetPlayerTeam(playerid, TEAM_GERMANY);
- case 6: AltSetPlayerTeam(playerid, TEAM_ITALY);
- case 7: AltSetPlayerTeam(playerid, TEAM_FRANCE);
- case 8: AltSetPlayerTeam(playerid, TEAM_CHINA);
- case 9: AltSetPlayerTeam(playerid, TEAM_INDIA);
- }
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- /*////////////////////////////////////
- COMMANDS
- *//////////////////////////////////////
- CMD:changeteam(playerid, params[])
- {
- ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"You have registered, please select your team.",""COLOR_USA_EMBED"United States\n"COLOR_CANADA_EMBED"Canada\n"COLOR_BRITAIN_EMBED"Britain\n"COLOR_AUSTRALIA_EMBED"Australia\n"COLOR_RUSSIA_EMBED"Russia\n"COLOR_CHINA_EMBED"China\n"COLOR_GERMANY_EMBED"Germany\n"COLOR_ITALY_EMBED"Italy\n"COLOR_INDIA_EMBED"India\n"COLOR_FRANCE_EMBED"France","Select","");
- return 1;
- }
- /*////////////////////////////////////////////////////
- YEET DAB
- *////////////////////////////////////////////////////
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Int("VIP",PlayerInfo[playerid][pVIP]);
- INI_Int("XP",PlayerInfo[playerid][pXP]);
- INI_Int("Level",PlayerInfo[playerid][pLevel]);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- /*Credits to Dracoblue*/
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- stock PlayerLevelUp(playerid)
- {
- PlayerInfo[playerid][pLevel]++;
- }
- stock GivePlayerXP(playerid, xpamount)
- {
- PlayerInfo[playerid][pXP] += xpamount;
- LevelUpCheck(playerid);
- }
- /*//////////////////////////////////////////////////
- LEVELS
- *//////////////////////////////////////////////////
- stock GetPlayerLevel(playerid)
- {
- if(PlayerInfo[playerid][pLevel] == 1) return 1;
- if(PlayerInfo[playerid][pLevel] == 2) return 2;
- if(PlayerInfo[playerid][pLevel] == 3) return 3;
- if(PlayerInfo[playerid][pLevel] == 4) return 4;
- if(PlayerInfo[playerid][pLevel] == 5) return 5;
- if(PlayerInfo[playerid][pLevel] == 6) return 6;
- if(PlayerInfo[playerid][pLevel] == 7) return 7;
- if(PlayerInfo[playerid][pLevel] == 8) return 8;
- if(PlayerInfo[playerid][pLevel] == 9) return 9;
- if(PlayerInfo[playerid][pLevel] == 10) return 10;
- if(PlayerInfo[playerid][pLevel] == 11) return 11;
- if(PlayerInfo[playerid][pLevel] == 12) return 12;
- if(PlayerInfo[playerid][pLevel] == 13) return 13;
- if(PlayerInfo[playerid][pLevel] == 14) return 14;
- if(PlayerInfo[playerid][pLevel] == 15) return 15;
- if(PlayerInfo[playerid][pLevel] == 16) return 16;
- if(PlayerInfo[playerid][pLevel] == 17) return 17;
- if(PlayerInfo[playerid][pLevel] == 18) return 18;
- if(PlayerInfo[playerid][pLevel] == 19) return 19;
- if(PlayerInfo[playerid][pLevel] == 20) return 20;
- if(PlayerInfo[playerid][pLevel] == 21) return 21;
- if(PlayerInfo[playerid][pLevel] == 22) return 22;
- if(PlayerInfo[playerid][pLevel] == 23) return 23;
- if(PlayerInfo[playerid][pLevel] == 24) return 24;
- if(PlayerInfo[playerid][pLevel] == 25) return 25;
- if(PlayerInfo[playerid][pLevel] == 26) return 26;
- if(PlayerInfo[playerid][pLevel] == 27) return 27;
- if(PlayerInfo[playerid][pLevel] == 28) return 28;
- if(PlayerInfo[playerid][pLevel] == 29) return 29;
- if(PlayerInfo[playerid][pLevel] == 30) return 30;
- }
- stock LevelUpCheck(playerid)
- {
- if(PlayerInfo[playerid][pXP] == 100) PlayerLevelUp(playerid); //To level 2
- if(PlayerInfo[playerid][pXP] == 250) PlayerLevelUp(playerid); //To level 3
- if(PlayerInfo[playerid][pXP] == 500) PlayerLevelUp(playerid); //To level 4
- if(PlayerInfo[playerid][pXP] == 750) PlayerLevelUp(playerid); //To level 5
- if(PlayerInfo[playerid][pXP] == 1000) PlayerLevelUp(playerid); //To level 6
- if(PlayerInfo[playerid][pXP] == 1250) PlayerLevelUp(playerid); //To level 7
- if(PlayerInfo[playerid][pXP] == 1500) PlayerLevelUp(playerid); //To level 8
- if(PlayerInfo[playerid][pXP] == 1750) PlayerLevelUp(playerid); //To level 9
- if(PlayerInfo[playerid][pXP] == 2000) PlayerLevelUp(playerid); //To level 10
- if(PlayerInfo[playerid][pXP] == 2500) PlayerLevelUp(playerid); //To level 11
- if(PlayerInfo[playerid][pXP] == 3000) PlayerLevelUp(playerid); //To level 12
- if(PlayerInfo[playerid][pXP] == 3500) PlayerLevelUp(playerid); //To level 13
- if(PlayerInfo[playerid][pXP] == 4000) PlayerLevelUp(playerid); //To level 14
- if(PlayerInfo[playerid][pXP] == 4500) PlayerLevelUp(playerid); //To level 15
- if(PlayerInfo[playerid][pXP] == 5000) PlayerLevelUp(playerid); //To level 16
- if(PlayerInfo[playerid][pXP] == 5500) PlayerLevelUp(playerid); //To level 17
- if(PlayerInfo[playerid][pXP] == 6000) PlayerLevelUp(playerid); //To Level 18
- if(PlayerInfo[playerid][pXP] == 6500) PlayerLevelUp(playerid); //To level 19
- if(PlayerInfo[playerid][pXP] == 7000) PlayerLevelUp(playerid); //To Level 20
- if(PlayerInfo[playerid][pXP] == 7500) PlayerLevelUp(playerid); //To Level 21
- if(PlayerInfo[playerid][pXP] == 8000) PlayerLevelUp(playerid); //To Level 22
- if(PlayerInfo[playerid][pXP] == 8500) PlayerLevelUp(playerid); //To Level 23
- if(PlayerInfo[playerid][pXP] == 9000) PlayerLevelUp(playerid); //To level 24
- if(PlayerInfo[playerid][pXP] == 10000) PlayerLevelUp(playerid); //To level 25
- if(PlayerInfo[playerid][pXP] == 11000) PlayerLevelUp(playerid); //To level 26
- if(PlayerInfo[playerid][pXP] == 12000) PlayerLevelUp(playerid); //To level 27
- if(PlayerInfo[playerid][pXP] == 13000) PlayerLevelUp(playerid); //To level 28
- if(PlayerInfo[playerid][pXP] == 14000) PlayerLevelUp(playerid); //To level 29
- if(PlayerInfo[playerid][pXP] == 15000) PlayerLevelUp(playerid); //To level 30
- }
- stock SetPlayerLevelName(playerid)
- {
- if(PlayerInfo[playerid][pLevel] == 1) pInfo[playerid][pLevelName] = "Private I";
- if(PlayerInfo[playerid][pLevel] == 2) pInfo[playerid][pLevelName] = "Private II";
- if(PlayerInfo[playerid][pLevel] == 3) pInfo[playerid][pLevelName] = "Private III";
- if(PlayerInfo[playerid][pLevel] == 4) pInfo[playerid][pLevelName] = "Private First Class";
- if(PlayerInfo[playerid][pLevel] == 5) pInfo[playerid][pLevelName] = "Specialist";
- if(PlayerInfo[playerid][pLevel] == 6) pInfo[playerid][pLevelName] = "Corporal";
- if(PlayerInfo[playerid][pLevel] == 7) pInfo[playerid][pLevelName] = "Sergeant";
- if(PlayerInfo[playerid][pLevel] == 8) pInfo[playerid][pLevelName] = "Staff Sergeant";
- if(PlayerInfo[playerid][pLevel] == 9) pInfo[playerid][pLevelName] = "Sergeant First Class";
- if(PlayerInfo[playerid][pLevel] == 10) pInfo[playerid][pLevelName] = "Master Sergeant";
- if(PlayerInfo[playerid][pLevel] == 11) pInfo[playerid][pLevelName] = "First Sergeant";
- if(PlayerInfo[playerid][pLevel] == 12) pInfo[playerid][pLevelName] = "Sergeant Major";
- if(PlayerInfo[playerid][pLevel] == 13) pInfo[playerid][pLevelName] = "Command Sergeant Major";
- if(PlayerInfo[playerid][pLevel] == 14) pInfo[playerid][pLevelName] = "Sergeant Major of the Army";
- if(PlayerInfo[playerid][pLevel] == 15) pInfo[playerid][pLevelName] = "Warrant Officer";
- if(PlayerInfo[playerid][pLevel] == 16) pInfo[playerid][pLevelName] = "Chief Warrant Officer II";
- if(PlayerInfo[playerid][pLevel] == 17) pInfo[playerid][pLevelName] = "Chief Warrant Officer III";
- if(PlayerInfo[playerid][pLevel] == 18) pInfo[playerid][pLevelName] = "Chief Warrant Officer IV";
- if(PlayerInfo[playerid][pLevel] == 19) pInfo[playerid][pLevelName] = "Chief Warrant Officer V";
- if(PlayerInfo[playerid][pLevel] == 20) pInfo[playerid][pLevelName] = "Second Lieutenant";
- if(PlayerInfo[playerid][pLevel] == 21) pInfo[playerid][pLevelName] = "First Lieutenant";
- if(PlayerInfo[playerid][pLevel] == 22) pInfo[playerid][pLevelName] = "Captain";
- if(PlayerInfo[playerid][pLevel] == 23) pInfo[playerid][pLevelName] = "Major";
- if(PlayerInfo[playerid][pLevel] == 24) pInfo[playerid][pLevelName] = "Lieutenant Colonel";
- if(PlayerInfo[playerid][pLevel] == 25) pInfo[playerid][pLevelName] = "Colonel";
- if(PlayerInfo[playerid][pLevel] == 26) pInfo[playerid][pLevelName] = "Brigadier General";
- if(PlayerInfo[playerid][pLevel] == 27) pInfo[playerid][pLevelName] = "Major General";
- if(PlayerInfo[playerid][pLevel] == 28) pInfo[playerid][pLevelName] = "Lieutenant General";
- if(PlayerInfo[playerid][pLevel] == 29) pInfo[playerid][pLevelName] = "General";
- if(PlayerInfo[playerid][pLevel] == 30) pInfo[playerid][pLevelName] = "General of the Army";
- }
- stock GetPlayerLevelName(playerid)
- {
- SetPlayerLevelName(playerid);
- return pInfo[playerid][pLevelName];
- }
- /*/////////////////////////////////////////
- TEAMS
- *///////////////////////////////////////////
- stock AltSetPlayerTeam(playerid, team)
- {
- SetPlayerTeam(playerid, team);
- PlayerInfo[playerid][pTeam] = team;
- SpawnPlayerAtTeam(playerid);
- if(team == TEAM_USA) SetPlayerColor(playerid, COLOR_USA);
- if(team == TEAM_CANADA) SetPlayerColor(playerid, COLOR_CANADA);
- if(team == TEAM_BRITAIN) SetPlayerColor(playerid, COLOR_BRITAIN);
- if(team == TEAM_AUSTRALIA) SetPlayerColor(playerid, COLOR_AUSTRALIA);
- if(team == TEAM_RUSSIA) SetPlayerColor(playerid, COLOR_RUSSIA);
- if(team == TEAM_GERMANY) SetPlayerColor(playerid, COLOR_GERMANY);
- if(team == TEAM_ITALY) SetPlayerColor(playerid, COLOR_ITALY);
- if(team == TEAM_FRANCE) SetPlayerColor(playerid, COLOR_FRANCE);
- if(team == TEAM_CHINA) SetPlayerColor(playerid, COLOR_CHINA);
- if(team == TEAM_INDIA) SetPlayerColor(playerid, COLOR_INDIA);
- }
- stock SpawnPlayerAtTeam(playerid)
- {
- new Float:USASpawns[3][4] =
- {
- {154.0558,1912.6029,18.8228,4.6064},
- {213.6994,1874.9786,17.6406,3.0163},
- {153.7363,1847.5313,17.6406,356.7496}
- };
- new Float:CanadaSpawns[3][4] =
- {
- {-472.4701,-194.1285,78.0881,20.1248},
- {-541.7864,-151.8316,77.0442,359.2529},
- {-536.2971,-98.5008,63.2969,273.6887}
- };
- new Float:BritainSpawns[3][4] =
- {
- {-1521.9277,481.4308,7.1875,180.5736},
- {-1348.7789,500.1924,18.2344,348.6155},
- {-1563.8306,316.6201,7.1875,131.1303}
- };
- new Float:AustraliaSpawns[3][4] =
- {
- {-688.0345,944.7898,13.6328,0.0469},
- {-686.2051,979.6094,12.1262,87.5167},
- {-687.8675,929.7429,13.6293,181.1319}
- };
- new Float:RussiaSpawns[3][4] =
- {
- {-2520.4351,-624.5309,132.7848,0.8743},
- {-2487.4331,-621.0484,132.5872,87.1375},
- {-2374.1062,-583.5718,132.1172,118.5435}
- };
- new Float:GermanySpawns[3][4] =
- {
- {1106.4036,-299.6010,74.5391,99.9817},
- {1073.4133,-345.0207,73.9922,356.5807},
- {1023.7352,-316.0926,73.9889,175.7202}
- };
- new Float:ItalySpawns[3][4] =
- {
- {-1070.8738,-1170.6907,129.6406,234.3037},
- {-1060.0549,-1205.3832,129.2188,267.3490},
- {-1067.8376,-1299.5409,129.2188,276.0990}
- };
- new Float:FranceSpawns[3][4] =
- {
- {-2237.7219,2353.6807,4.9803,132.8337},
- {-2241.0059,2333.7966,4.9918,99.6200},
- {-2281.6807,2288.4836,4.9704,271.9083}
- };
- new Float:ChinaSpawns[3][4] =
- {
- {2735.4065,-2452.2302,17.5938,359.3937},
- {2721.3025,-2386.2537,17.3403,266.3329},
- {2752.5508,-2513.4436,13.6402,19.0380}
- };
- new Float:IndiaSpawns[3][4] =
- {
- {2841.2942,1285.7273,11.3906,88.5804},
- {2794.3298,1256.1736,11.0299,4.2696},
- {2837.1394,1337.4557,11.0877,82.9403}
- };
- new rnd;
- if(PlayerInfo[playerid][pTeam] == TEAM_USA) rnd = random(sizeof(USASpawns)); SetPlayerPos(playerid,USASpawns[rnd][0],USASpawns[rnd][1],USASpawns[rnd][2]); SetPlayerFacingAngle(playerid, USASpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_CANADA) rnd = random(sizeof(CanadaSpawns)); SetPlayerPos(playerid,CanadaSpawns[rnd][0],CanadaSpawns[rnd][1],CanadaSpawns[rnd][2]); SetPlayerFacingAngle(playerid, CanadaSpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_BRITAIN) rnd = random(sizeof(BritainSpawns)); SetPlayerPos(playerid,BritainSpawns[rnd][0],BritainSpawns[rnd][1],BritainSpawns[rnd][2]); SetPlayerFacingAngle(playerid, BritainSpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_AUSTRALIA) rnd = random(sizeof(AustraliaSpawns)); SetPlayerPos(playerid,AustraliaSpawns[rnd][0],AustraliaSpawns[rnd][1],AustraliaSpawns[rnd][2]); SetPlayerFacingAngle(playerid, AustraliaSpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_RUSSIA) rnd = random(sizeof(RussiaSpawns)); SetPlayerPos(playerid,RussiaSpawns[rnd][0],RussiaSpawns[rnd][1],RussiaSpawns[rnd][2]); SetPlayerFacingAngle(playerid,RussiaSpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_GERMANY) rnd = random(sizeof(GermanySpawns)); SetPlayerPos(playerid,GermanySpawns[rnd][0],GermanySpawns[rnd][1],GermanySpawns[rnd][2]); SetPlayerFacingAngle(playerid, GermanySpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_ITALY) rnd = random(sizeof(ItalySpawns)); SetPlayerPos(playerid,ItalySpawns[rnd][0],ItalySpawns[rnd][1],ItalySpawns[rnd][2]); SetPlayerFacingAngle(playerid, ItalySpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_FRANCE) rnd = random(sizeof(FranceSpawns)); SetPlayerPos(playerid,FranceSpawns[rnd][0],FranceSpawns[rnd][1],FranceSpawns[rnd][2]); SetPlayerFacingAngle(playerid, FranceSpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_CHINA) rnd = random(sizeof(ChinaSpawns)); SetPlayerPos(playerid,ChinaSpawns[rnd][0],ChinaSpawns[rnd][1],ChinaSpawns[rnd][2]); SetPlayerFacingAngle(playerid, ChinaSpawns[rnd][3]);
- if(PlayerInfo[playerid][pTeam] == TEAM_INDIA) rnd = random(sizeof(IndiaSpawns)); SetPlayerPos(playerid,IndiaSpawns[rnd][0],IndiaSpawns[rnd][1],IndiaSpawns[rnd][2]); SetPlayerFacingAngle(playerid, IndiaSpawns[rnd][3]);
- SetCameraBehindPlayer(playerid);
- SetPlayerSkin(playerid, 287);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement