18.06.2013, 03:45
EDIT: Login & Register System tutorial link: https://sampforum.blast.hk/showthread.php?tid=273088
So, I just got done doing a step-by-step tutorial on making a log in, and register system... I've just compiled the script, and it's saying I have 9 errors; check it out.
PAWNO Compiler:
Here's my script:
Anyone that fixes the script with no errors will receive reputation.
So, I just got done doing a step-by-step tutorial on making a log in, and register system... I've just compiled the script, and it's saying I have 9 errors; check it out.
PAWNO Compiler:
pawn Code:
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_debug.inc(277) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_debug.inc(339) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_debug.inc(344) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_amx.inc(454) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_amx.inc(904) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_amx.inc(926) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(246) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(343) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(369) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(396) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(475) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(497) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(540) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_utils.inc(558) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_malloc.inc(216) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_malloc.inc(488) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_malloc.inc(613) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_hooks/impl.inc(225) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_inline.inc(260) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_inline.inc(678) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(837) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(957) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1030) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1051) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1070) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1074) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1092) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1124) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1160) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1188) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\pawno\include\YSI\y_ini.inc(1344) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(72) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(93) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(95) : error 017: undefined symbol "PlayerInfo"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(96) : error 017: undefined symbol "PlayerInfo"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(97) : error 017: undefined symbol "PlayerInfo"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(98) : error 017: undefined symbol "PlayerInfo"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(99) : error 017: undefined symbol "PlayerInfo"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(341) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(341) : error 017: undefined symbol "COL_WHITE"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(341) : warning 215: expression has no effect
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(341) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\mom2k_000\Documents\samp03x_svr_R1-2_win32\gamemodes\cod2.pwn(341) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
9 Errors.
pawn Code:
////////////////////////////////////////////////////////////////////////////////
// Name: Call of Duty 2 [COD2] //
// Author: Rapha3L, Hollywood/DJTunes //
// Script Version: 0.1 //
// Last Update: Never //
// Helpers: [_MS_]BodyBuilder //
// Thanks to: [_MS_]BodyBuilder //
// Info: This is a simple base to DM Servers. Check out the updates. //
// Notice: This is an edited version of Rapha3L's TDM script. //
////////////////////////////////////////////////////////////////////////////////
// Updates //
// 6/17/2013 - Added Random Messages. //
////////////////////////////////////////////////////////////////////////////////
//---[Includes]---//
#include <a_samp>
#include <zcmd>
#include <YSI\y_ini>
//---[Login Dialogs]---//
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
//---[Colors---//
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xF0F8FFAA
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0XA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_SEAGREEN 0x20B2AAAA
#define COLOR_LIMEGREEN 0x32CD32AA
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA
#define COLOR_YELLOWGREEN 0x9ACD32AA
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA
//---[Login & Register System Stocks]---//
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
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;
}
//---[Login & Register System Functions]---//
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]);
return 1;
}
//---[Login & Register System Variables]---//
enum pInfo
{
pPass,
pCash,
pAdmin,
pKills,
pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];
//---[Random Messages Settings (Settings)---//
new RandomMSG[][] =
{
"Welcome to Call of Duty 2, scripted by Hollywood (DJTunes)!",
"The release of this script is posted on SA-MP forums.",
"Please be sure to add reputation to DJTunes!"
};
//---[Random Messages Settings (Foward)]---//
forward SendMSG();
//---[Random Messages Settings (Settings)---//
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(COLOR_GREEN, RandomMSG[randMSG]);
}
//---[Random Spawns]---//
new Float:RandomSpawns[][] =
{
{-1513.3469,2536.8325,55.6875,46.0863},
{-1534.5206,2543.3533,55.8359,64.1873},
{-1537.3022,2560.8057,55.8359,9.9801},
{-1537.1564,2592.4919,55.8359,347.1066},
{-1552.3397,2600.5630,55.8359,36.6137},
{-1523.5328,2608.2029,55.8359,289.7661},
{-1489.5654,2607.8162,55.8359,291.6460},
{-1479.0426,2595.0493,55.8359,39.5787},
{-1460.0007,2619.5195,58.7734,152.6931},
{-1435.4955,2608.3745,55.8359,274.4125},
{-1420.5632,2613.4656,55.8359,146.4264},
{-1414.7498,2594.2373,55.8403,51.7988},
{-1458.2444,2641.4443,55.8359,38.4703},
{-1476.6389,2661.3892,55.8359,56.9571},
{-1507.6934,2663.9001,55.8359,81.7107},
{-1528.0374,2677.3118,55.8359,171.7108},
{-1562.5850,2662.7412,55.8359,349.1795},
{-1539.6945,2623.1128,55.8359,196.7286},
{-1513.9823,2594.6506,55.8359,279.3923}
};
//---[Textdraw - Server Name]---//
new Text:Textdraw1;
//---[Server Configs + Objects & Skins]---//
public OnGameModeInit()
{
SetTimer("SendMSG", 120000, true);
SetGameModeText("COD2");
SendRconCommand("mapname Downturn");
UsePlayerPedAnims();
DisableInteriorEnterExits();
Textdraw1= TextDrawCreate(1.0, 433.0, "Call of Duty 2 v0.1");
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawFont(Textdraw1,2);
TextDrawLetterSize(Textdraw1,0.2999, 1.4);
TextDrawBoxColor(Textdraw1,0x00000050);
TextDrawColor(Textdraw1,0xffffffff);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw1,1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw1);
}
}
//---[Skins]---//
AddPlayerClass(18, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(19, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(17, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(23, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(29, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(45, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(78, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(97, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(101, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
AddPlayerClass(145, 1958.3783, 1343.1572, 15.3746, 269.1425, 24, 9999, 25, 9999, 34, 500);
//---[Cars]---//
AddStaticVehicleEx(475,-1507.6999500,2526.6999500,55.6000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(542,-1522.6999500,2526.6999500,55.6000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(562,-1482.6999500,2560.3000500,55.6000000,50.0000000,-1,-1,15);
AddStaticVehicleEx(562,-1485.8000500,2545.6001000,55.6000000,203.9990000,-1,-1,15);
AddStaticVehicleEx(477,-1522.5000000,2588.5000000,55.7000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(477,-1502.0999800,2635.3999000,55.7000000,196.0000000,-1,-1,15);
AddStaticVehicleEx(411,-1472.1999500,2691.0000000,55.6000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(411,-1445.1999500,2682.5000000,55.6000000,124.0000000,-1,-1,15);
AddStaticVehicleEx(411,-1400.0000000,2653.1999500,55.5000000,87.9970000,-1,-1,15);
AddStaticVehicleEx(411,-1400.0000000,2638.1999500,55.5000000,87.9950000,-1,-1,15);
AddStaticVehicleEx(555,-1432.4000200,2591.8999000,55.6000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(555,-1446.4000200,2589.0000000,55.6000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(555,-1464.1999500,2589.3000500,55.6000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(536,-1563.9000200,2687.8999000,55.5000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(567,-1559.8000500,2693.6999500,55.8000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(535,-1596.0999800,2692.6999500,54.8000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(401,-1560.0999800,2632.8000500,55.7000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(506,-1532.0000000,2641.8999000,55.6000000,60.0000000,-1,-1,15);
AddStaticVehicleEx(477,-1567.9000200,2640.3999000,55.7000000,290.0000000,-1,-1,15);
//---[Objects]---//
//---[Drift]---//
AddStaticVehicleEx(411,-342.8999900,1515.5999800,75.2000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(411,-339.7000100,1515.5000000,75.2000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(560,-330.2000100,1515.3000500,75.2000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(560,-333.2000100,1515.5000000,75.2000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(411,-336.2999900,1514.8000500,75.2000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(560,-327.3999900,1514.9000200,75.2000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(562,-324.1000100,1515.4000200,75.1000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(562,-321.1000100,1515.3000500,75.1000000,0.0000000,-1,-1,15);
AddStaticVehicleEx(562,-318.0000000,1514.9000200,75.1000000,0.0000000,-1,-1,15);
CreateObject(3749,-302.2999900,1510.0000000,80.2000000,0.0000000,0.0000000,0.0000000);
CreateObject(3516,-304.0000000,1511.6999500,77.6000000,0.0000000,0.0000000,192.0000000);
//---[Parkour]---//
CreateObject(972,1531.47973600,-1359.22656300,328.45034800,0.00000000,0.00000000,0.00000000);
CreateObject(972,1550.99121100,-1359.23681600,328.45581100,0.00000000,0.00000000,0.00000000);
CreateObject(972,1542.70861800,-1365.28625500,328.15380900,0.00000000,0.00000000,-89.38141604);
CreateObject(974,1551.05700700,-1345.10205100,331.23623700,0.00000000,0.00000000,0.00000000);
CreateObject(974,1538.19177200,-1345.07312000,331.24121100,0.00000000,0.00000000,0.00000000);
CreateObject(978,1544.50683600,-1337.02807600,329.04757700,94.53809349,0.00000000,-88.52197935);
CreateObject(978,1544.70898400,-1345.88708500,327.34652700,-245.79883682,256.97151382,14.61042378);
CreateObject(978,1544.23742700,-1324.61401400,329.04776000,94.53809349,0.00000000,-88.52197935);
CreateObject(974,1544.29467800,-1316.17517100,328.01788300,91.95972612,0.00000000,0.00000000);
CreateObject(974,1544.08886700,-1307.95434600,326.07467700,91.95972612,0.00000000,0.00000000);
CreateObject(974,1544.86120600,-1299.68432600,328.92422500,91.95972612,0.00000000,0.00000000);
CreateObject(974,1553.25988800,-1299.90087900,330.80770900,91.95972612,0.00000000,0.00000000);
CreateObject(974,1560.94299300,-1300.69543500,328.54486100,91.95972612,0.00000000,0.00000000);
CreateObject(974,1564.03942900,-1299.92248500,331.32266200,183.91950953,0.00000000,-89.38141604);
CreateObject(974,1561.32983400,-1292.13647500,326.95224000,91.95972612,0.00000000,0.00000000);
CreateObject(974,1562.18335000,-1287.30468800,324.15411400,91.95972612,0.00000000,0.00000000);
CreateObject(3258,1559.69677700,-1287.83447300,322.73663300,118.60232089,0.00000000,-88.52197935);
CreateObject(3257,1555.85412600,-1255.20996100,276.35571300,0.00000000,0.00000000,0.00000000);
CreateObject(3287,1565.30419900,-1254.09912100,288.89392100,0.00000000,0.00000000,0.00000000);
CreateObject(3287,1571.85827600,-1254.17468300,288.93530300,0.00000000,0.00000000,0.00000000);
CreateObject(3502,1537.46252400,-1282.56335400,314.28128100,0.00000000,0.00000000,0.00000000);
CreateObject(3502,1538.06433100,-1274.25805700,313.83450300,-6.01605685,0.00000000,-7.73493023);
CreateObject(3502,1539.64648400,-1267.35376000,312.58728000,-12.03211370,0.00000000,-16.32929716);
CreateObject(3502,1541.58178700,-1256.78161600,307.05413800,-85.08423258,0.00000000,-16.32929716);
CreateObject(974,1541.15478500,-1254.38464400,311.65838600,91.95972612,0.00000000,0.00000000);
CreateObject(974,1541.23645000,-1262.01538100,310.14981100,91.95972612,0.00000000,0.00000000);
CreateObject(974,1546.33313000,-1258.03479000,310.41314700,91.95972612,0.00000000,0.00000000);
CreateObject(974,1536.39111300,-1257.45532200,310.30587800,91.95972612,0.00000000,11.17267701);
CreateObject(974,1540.46557600,-1255.21789600,298.40844700,91.95972612,0.00000000,3.43774677);
CreateObject(974,1544.44763200,-1255.29968300,298.42996200,91.95972612,0.00000000,-4.29718346);
CreateObject(3257,1585.73034700,-1253.02539100,272.12976100,0.00000000,0.00000000,-88.52197935);
CreateObject(3257,1585.98681600,-1261.29406700,272.13314800,0.00000000,0.00000000,-268.14419083);
CreateObject(3631,1594.14160200,-1257.08642600,286.86883500,0.00000000,0.00000000,1.71887339);
CreateObject(3631,1604.56164600,-1256.77233900,286.85174600,0.00000000,0.00000000,1.71887339);
CreateObject(3631,1615.55175800,-1256.58337400,286.85958900,0.00000000,0.00000000,1.71887339);
CreateObject(3636,1633.98425300,-1255.84838900,276.36599700,82.50592250,0.00000000,-1.71887339);
CreateObject(3636,1650.99963400,-1256.63537600,274.60452300,82.50592250,0.00000000,-1.71887339);
CreateObject(3636,1666.38598600,-1255.20495600,272.61486800,82.50592250,0.00000000,17.18873385);
CreateObject(3636,1681.09021000,-1248.78125000,273.70929000,82.50592250,0.00000000,27.50197417);
CreateObject(3636,1694.77307100,-1239.38745100,274.84780900,82.50592250,0.00000000,39.53408786);
CreateObject(6867,1714.95483400,-1178.67041000,297.15399200,0.00000000,0.00000000,-51.56620156);
CreateObject(974,1706.98413100,-1211.47265600,277.03076200,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1701.03759800,-1204.87646500,276.81738300,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1693.76635700,-1197.61450200,276.82901000,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1702.92028800,-1178.17627000,279.18060300,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1697.31506300,-1182.87817400,279.61947600,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1690.98498500,-1185.70861800,280.65783700,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1707.23571800,-1118.80554200,273.88061500,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1711.80139200,-1115.36169400,276.67355300,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1716.70105000,-1121.03784200,278.09811400,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1722.69030800,-1124.65515100,279.08462500,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1727.63134800,-1129.97741700,280.64492800,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1732.61572300,-1125.55322300,282.77932700,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1740.99438500,-1120.95617700,280.22213700,90.24085273,0.00000000,-49.84732818);
CreateObject(974,1744.08374000,-1121.66052200,281.85693400,183.06007284,0.00000000,39.53408786);
CreateObject(974,1779.22509800,-1161.04113800,280.83062700,268.14419083,0.00000000,39.53408786);
CreateObject(3330,1804.41137700,-1187.47509800,270.03402700,-31.79915763,0.00000000,37.81521448);
CreateObject(3330,1820.63317900,-1210.19104000,233.51001000,-55.00394833,0.00000000,37.81521448);
CreateObject(3411,1879.03271500,-1241.67932100,183.44625900,0.00000000,0.00000000,-53.28501765);
CreateObject(4550,1957.40417500,-1183.40344200,126.30550400,124.61832044,0.00000000,126.33730842);
//---[Biz 1 - Config]---//
CreatePickup(1239, 1,-1519.2203,2609.5698,55.8359, 0);
Create3DTextLabel("Biz", COLOR_GREENYELLOW, -1519.1837,2609.2742,56.3359, 20, 0);
return 1;
}
//---[Server Configs #2]---//
public OnGameModeExit()
{
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 2004.7404,1913.8379,40.3516);
SetPlayerFacingAngle(playerid,264.7556);
SetPlayerTime(playerid, 0,0);
InterpolateCameraPos(playerid,2013.6698,1913.9120,35.0304,2013.6698,1913.9120,35.0304+100,10000);
InterpolateCameraLookAt(playerid,2004.7404,1913.8379,40.3516,2004.7404,1913.8379,40.3516+50,10000);
return 1;
}
//---[Server Opening]---//
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
}
return 1;
}
new str[78], pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, sizeof(pnome));
format(str, sizeof(str), "{1E90FF}%s {006400}(ID:%d) {B22222}Connected to Call of Duty 2.", pnome, playerid);
SendClientMessageToAll(-1, str);
TextDrawShowForPlayer(playerid, Textdraw1);
PlayAudioStreamForPlayer(playerid, "http://rapha3l.comyr.com/eldm/songs/intro.mp3");
return 1;
}
//---[Spawn]---//
public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid,5000);
GivePlayerWeapon(playerid,4,1);
GivePlayerWeapon(playerid,31,9999);
GivePlayerWeapon(playerid,1,0);
new Random = random(sizeof(RandomSpawns));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
StopAudioStreamForPlayer(playerid);
return 1;
}
//---[Leaving Server]---//
public OnPlayerDisconnect(playerid, reason)
{
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_Close(File);
}
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"{1E90FF}%s {006400}(ID:%d) {B22222}left the battlefield. {006400}(Timed out)",name);
case 1: format(string,sizeof string,"{1E90FF}%s {006400}(ID:%d) {B22222}left the battlefield. {006400}(Leaving)",name);
case 2: format(string,sizeof string,"{1E90FF}%s {006400}(ID:%d) {B22222}left the battlefield. {006400}(Kicked/Banned)",name);
}
return 1;
}
//---[Commands]---//
//---[Kill]---//
CMD:kill(playerid)
{
SetPlayerHealth(playerid,0.0);
new str[78], pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, sizeof(pnome));
format(str, sizeof(str), "{1E90FF}%s {006400}(ID:%d) {B22222}has been killed. {FFA54F}/kill.", pnome, playerid);
SendClientMessageToAll(-1, str);
return 1;
}
//---[Run Weapons Arena]---//
CMD:runw(playerid)
{
SetPlayerPos(playerid, 1373.8341, 2196.1016, 14.2495);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,4,1);
GivePlayerWeapon(playerid,24,9999);
GivePlayerWeapon(playerid,26,9999);
GivePlayerWeapon(playerid,28,9999);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
new str[78], pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, sizeof(pnome));
format(str, sizeof(str), "{1E90FF}%s {006400}(ID:%d) {B22222}Teleported to the Arena.", pnome, playerid);
SendClientMessageToAll(-1, str);
return 1;
}
//---[Drift]---//
CMD:drift(playerid)
{
SetPlayerPos(playerid, -303.8535,1532.6465,75.3594);
ResetPlayerWeapons(playerid);
new str[78], pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, sizeof(pnome));
format(str, sizeof(str), "{1E90FF}%s {006400}(ID:%d) {B22222}Teleported to the Drift Zone.", pnome, playerid);
SendClientMessageToAll(-1, str);
return 1;
}
//---[Parkour]---//
CMD:parkour(playerid)
{
SetPlayerPos(playerid,1544.9849,-1353.7681,329.4735);
new name[128];
new string[256];
GetPlayerName(playerid,name,128);
format(string, sizeof(string), "{1E90FF}%s {006400}(ID:%d) {B22222}Teleported to the Parkour Zone.",name);
SendClientMessageToAll(0x99FFFFAA, string);
SetPlayerInterior(playerid, 0);
PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0);
return 1;
}
//---[Biz Commands]---//
CMD:enter(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,-1519.2583,2608.9690,55.8359))
{
SetPlayerPos(playerid, 1118.8878,-10.2737,1002.0859);
SetPlayerInterior(playerid, 12);
}
return 1;
}
CMD:exit(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1118.8878,-10.2737,1002.0859))
{
SetPlayerPos(playerid, -1519.2583,2608.9690,55.8359);
SetPlayerInterior(playerid, 0);
}
return 1;
}
CMD:heal(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1118.8878,-10.2737,1002.0859))
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
new str[78], pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, sizeof(pnome));
format(str, sizeof(str), "{1E90FF}%s {006400}(ID:%d) {B22222}Bought a medical kit!", pnome, playerid);
SendClientMessageToAll(-1, str);
}
return 1;
}
CMD:nadepack(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1118.8878,-10.2737,1002.0859))
{
GivePlayerWeapon(playerid,16,10);
new str[78], pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, sizeof(pnome));
format(str, sizeof(str), "{1E90FF}%s {006400}(ID:%d) {B22222}Bought a frag package!", pnome, playerid);
SendClientMessageToAll(-1, str);
}
return 1;
}
CMD:pack2(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1118.8878,-10.2737,1002.0859))
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,8,1);
GivePlayerWeapon(playerid,23,9999);
GivePlayerWeapon(playerid,27,9999);
GivePlayerWeapon(playerid,33,9999);
GivePlayerWeapon(playerid,29,9999);
new str[78], pnome[MAX_PLAYER_NAME];
GetPlayerName(playerid, pnome, sizeof(pnome));
format(str, sizeof(str), "{1E90FF}%s {006400}(ID:%d) {B22222}Bought Weapons Package 2!", pnome, playerid);
SendClientMessageToAll(-1, str);
}
return 1;
}
//---[Death's]---//
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[killerid][pKills]++;
PlayerInfo[playerid][pDeaths]++;
}
SendDeathMessage(killerid, playerid, reason);
return 1;
}
//---[Login & Register System OnDialogResponse]---//
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, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type 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_Close(File);
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
}
}
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]);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
}
return 1;
}
}
}
return 1;
}