Messed up OnPlayerConnect can someone help me out? -
Dokins - 05.02.2013
Errors
pawn Код:
C:\Users\user\Desktop\Bone County Roleplay\gamemodes\BCRP_MYSQL.pwn(2339) : error 017: undefined symbol "SaveWeapons"
C:\Users\user\Desktop\Bone County Roleplay\gamemodes\BCRP_MYSQL.pwn(2368) : error 017: undefined symbol "SaveWeapons"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
pawn Код:
//ONPLAYERCONNECTpublic OnPlayerConnect
(playerid
){ new escape
[MAX_PLAYER_NAME
*2],query
[256];
mysql_real_escape_string
(GetName
(playerid
), escape
);
format(query,
sizeof(query
),
"SELECT `id` FROM `accounts` WHERE `PlayerName` = '%s' LIMIT 1", escape
);
mysql_query
(query
);
mysql_store_result
();
if(mysql_num_rows
() > 0) { PlayerSQLID
[playerid
] = mysql_fetch_int
();
new string
[256],ip
[16], pip;
Tazed
[playerid
] = 0;
pip
= GetPlayerIp
(playerid, ip,
sizeof(ip
));
Time
[playerid
] = gettime();
BanTime
[playerid
] = MySQL_GetValue
(PlayerSQLID
[playerid
],
"BanTime",
"accounts");
if(BanTime
[playerid
] > Time
[playerid
]) { format(string,
sizeof(string
),
"You are still {FF0000}BANNED{FFFFFF} from Bone County Roleplay until {FF0000}%s", date
(BanTime
[playerid
]));
SendClientMessage
(playerid, COLOUR_WHITE, string
);
SendClientMessage
(playerid, COLOUR_REALRED,
"{FFFFFF}PLEASE DO {FF0000}NOT{FFFFFF} POST A {FF0000}BAN APPEAL {FFFFFF}as this is a Temporary Ban.");
SetTimerEx
("KickPlayer",
100,false,
"i",playerid
);
// Kicks player in 500ms } if(Time
[playerid
] > BanTime
[playerid
]) // Check when a player connects to see if they have a timestamp, and if they do, check if it exceeds gettime() { MySQL_SetInteger
(PlayerSQLID
[playerid
],
"BanTime",
0,
"accounts");
} if(IsPlayerBanned
(playerid
) == 1) { format(string,
sizeof(string
),
"Your IP:{FF0000} %s{FFFFFF} is {FF0000}BANNED{FFFFFF} from Bone County Roleplay.", pip
);
SendClientMessage
(playerid, COLOUR_WHITE, string
);
format(string,
sizeof(string
),
"PLEASE POST A {FF0000}BAN APPEAL{FFFFFF} ON http://bc-rp.net/forum/");
SendClientMessage
(playerid, COLOUR_WHITE, string
);
SetTimerEx
("KickPlayer",
100,false,
"i",playerid
);
// Kicks player in 500ms } if(BanTime
[playerid
] == 0 && IsPlayerBanned
(playerid
)== 0) { format(string,
sizeof(string
),
"Welcome to %s (SQLID %d)\n\nPlease enter your password below:", HOSTNAME, PlayerSQLID
[playerid
]);
ShowPlayerDialog
(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,
"Login Dialog", string,
"Login",
"Leave");
} } else { new string
[256];
format(string,
sizeof(string
),
"Welcome to %s\n\nPlease create an account by entering a password below:", HOSTNAME
);
ShowPlayerDialog
(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,
"Register Dialog", string,
"Register",
"Leave");
} mysql_free_result
();
format(query,
sizeof(query
),
"%s has connected to the server.", GetNameEx
(playerid
));
foreach
(Player, i
) { if(AdminLevel
[i
] > 0) { SendClientMessage
(i, COLOUR_LIGHTRED, query
);
} } RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
//Liam 2. RemoveBuildingForPlayer
(playerid,
16672,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16735,
-49.2422,
1137.7031,
28.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
65.0313,
1148.2344,
18.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
59.0391,
1181.6797,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
71.1797,
1182.1719,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
66.7969,
1207.1563,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
72.0859,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
73.0938,
1228.0391,
19.0781,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
77.3594,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1308,
76.9297,
1187.2969,
17.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
90.0859,
1147.8828,
16.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
16673,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
16479,
86.2422,
1214.0391,
17.7422,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
78.2578,
1226.8516,
19.3672,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
83.2813,
1225.2656,
19.8203,
0.25);
//liam 3 RemoveBuildingForPlayer
(playerid,
16672,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16735,
-49.2422,
1137.7031,
28.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
65.0313,
1148.2344,
18.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
59.0391,
1181.6797,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
71.1797,
1182.1719,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
66.7969,
1207.1563,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
72.0859,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
73.0938,
1228.0391,
19.0781,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
77.3594,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1308,
76.9297,
1187.2969,
17.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
130.3828,
1029.3516,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
134.8984,
1032.1250,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
137.1328,
1036.2422,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
139.7734,
1052.9609,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
141.6797,
1071.9844,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
141.0391,
1066.7500,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
97.1172,
1107.4141,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
97.2578,
1102.1172,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
98.8359,
1115.2734,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
96.7031,
1112.6719,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
104.1250,
1115.0000,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
109.3984,
1115.0000,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
90.0859,
1147.8828,
16.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
16673,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
16479,
86.2422,
1214.0391,
17.7422,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
78.2578,
1226.8516,
19.3672,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
83.2813,
1225.2656,
19.8203,
0.25);
SetPlayerColor
(playerid, COLOUR_WHITE
);
TextDrawHideForPlayer
(playerid, speed
[playerid
]);
TextDrawHideForPlayer
(playerid, fuel
[playerid
]);
//SetTimerEx("DoLoginProcess", 3000, false,"i", playerid);SaveWeapons
(){ for(new p
= 0; p
< MAX_PLAYERS; p
++) { if(LoggedIn
[p
] == 1) { for(new w
= 0; w
< 13; w
++) { GetPlayerWeaponData
(p, w, PlayerWeapons
[p
][w
], PlayerWeaponAmmo
[p
][w
]);
new fieldname
[50],
Float:armour;
format(fieldname,
sizeof(fieldname
),
"Weapon%d", w
);
MySQL_SetInteger
(PlayerSQLID
[p
], fieldname, PlayerWeapons
[p
][w
],
"accounts");
format(fieldname,
sizeof(fieldname
),
"Weapon%dAmmo", w
);
MySQL_SetInteger
(PlayerSQLID
[p
], fieldname, PlayerWeaponAmmo
[p
][w
],
"accounts");
GetPlayerArmour
(p, armour
);
MySQL_SetFloat
(PlayerSQLID
[p
],
"Armour", armour,
"accounts");
} } } } return 1;
}
Re: Messed up OnPlayerConnect can someone help me out? -
Faisal_khan - 05.02.2013
You were missing a brace ({}) and a return:
pawn Код:
public OnPlayerConnect
(playerid
){ new escape
[MAX_PLAYER_NAME
*2],query
[256];
mysql_real_escape_string
(GetName
(playerid
), escape
);
format(query,
sizeof(query
),
"SELECT `id` FROM `accounts` WHERE `PlayerName` = '%s' LIMIT 1", escape
);
mysql_query
(query
);
mysql_store_result
();
if(mysql_num_rows
() > 0) { PlayerSQLID
[playerid
] = mysql_fetch_int
();
new string
[256],ip
[16], pip;
Tazed
[playerid
] = 0;
pip
= GetPlayerIp
(playerid, ip,
sizeof(ip
));
Time
[playerid
] = gettime();
BanTime
[playerid
] = MySQL_GetValue
(PlayerSQLID
[playerid
],
"BanTime",
"accounts");
if(BanTime
[playerid
] > Time
[playerid
]) { format(string,
sizeof(string
),
"You are still {FF0000}BANNED{FFFFFF} from Bone County Roleplay until {FF0000}%s", date
(BanTime
[playerid
]));
SendClientMessage
(playerid, COLOUR_WHITE, string
);
SendClientMessage
(playerid, COLOUR_REALRED,
"{FFFFFF}PLEASE DO {FF0000}NOT{FFFFFF} POST A {FF0000}BAN APPEAL {FFFFFF}as this is a Temporary Ban.");
SetTimerEx
("KickPlayer",
100,false,
"i",playerid
);
// Kicks player in 500ms } if(Time
[playerid
] > BanTime
[playerid
]) // Check when a player connects to see if they have a timestamp, and if they do, check if it exceeds gettime() { MySQL_SetInteger
(PlayerSQLID
[playerid
],
"BanTime",
0,
"accounts");
} if(IsPlayerBanned
(playerid
) == 1) { format(string,
sizeof(string
),
"Your IP:{FF0000} %s{FFFFFF} is {FF0000}BANNED{FFFFFF} from Bone County Roleplay.", pip
);
SendClientMessage
(playerid, COLOUR_WHITE, string
);
format(string,
sizeof(string
),
"PLEASE POST A {FF0000}BAN APPEAL{FFFFFF} ON http://bc-rp.net/forum/");
SendClientMessage
(playerid, COLOUR_WHITE, string
);
SetTimerEx
("KickPlayer",
100,false,
"i",playerid
);
// Kicks player in 500ms } if(BanTime
[playerid
] == 0 && IsPlayerBanned
(playerid
)== 0) { format(string,
sizeof(string
),
"Welcome to %s (SQLID %d)\n\nPlease enter your password below:", HOSTNAME, PlayerSQLID
[playerid
]);
ShowPlayerDialog
(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,
"Login Dialog", string,
"Login",
"Leave");
} } else { new string
[256];
format(string,
sizeof(string
),
"Welcome to %s\n\nPlease create an account by entering a password below:", HOSTNAME
);
ShowPlayerDialog
(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,
"Register Dialog", string,
"Register",
"Leave");
} mysql_free_result
();
format(query,
sizeof(query
),
"%s has connected to the server.", GetNameEx
(playerid
));
foreach
(Player, i
) { if(AdminLevel
[i
] > 0) { SendClientMessage
(i, COLOUR_LIGHTRED, query
);
} } RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
//Liam 2. RemoveBuildingForPlayer
(playerid,
16672,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16735,
-49.2422,
1137.7031,
28.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
65.0313,
1148.2344,
18.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
59.0391,
1181.6797,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
71.1797,
1182.1719,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
66.7969,
1207.1563,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
72.0859,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
73.0938,
1228.0391,
19.0781,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
77.3594,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1308,
76.9297,
1187.2969,
17.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
90.0859,
1147.8828,
16.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
16673,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
16479,
86.2422,
1214.0391,
17.7422,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
78.2578,
1226.8516,
19.3672,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
83.2813,
1225.2656,
19.8203,
0.25);
//liam 3 RemoveBuildingForPlayer
(playerid,
16672,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16735,
-49.2422,
1137.7031,
28.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
65.0313,
1148.2344,
18.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
59.0391,
1181.6797,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
71.1797,
1182.1719,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
66.7969,
1207.1563,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
72.0859,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
73.0938,
1228.0391,
19.0781,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
77.3594,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1308,
76.9297,
1187.2969,
17.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
130.3828,
1029.3516,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
134.8984,
1032.1250,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
137.1328,
1036.2422,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
139.7734,
1052.9609,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
141.6797,
1071.9844,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
141.0391,
1066.7500,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
97.1172,
1107.4141,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
97.2578,
1102.1172,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
98.8359,
1115.2734,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
96.7031,
1112.6719,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
104.1250,
1115.0000,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
109.3984,
1115.0000,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
90.0859,
1147.8828,
16.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
16673,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
16479,
86.2422,
1214.0391,
17.7422,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
78.2578,
1226.8516,
19.3672,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
83.2813,
1225.2656,
19.8203,
0.25);
SetPlayerColor
(playerid, COLOUR_WHITE
);
TextDrawHideForPlayer
(playerid, speed
[playerid
]);
TextDrawHideForPlayer
(playerid, fuel
[playerid
]);
return 1;
//missing return here}//missing brace here//SetTimerEx("DoLoginProcess", 3000, false,"i", playerid);SaveWeapons
(){ for(new p
= 0; p
< MAX_PLAYERS; p
++) { if(LoggedIn
[p
] == 1) { for(new w
= 0; w
< 13; w
++) { GetPlayerWeaponData
(p, w, PlayerWeapons
[p
][w
], PlayerWeaponAmmo
[p
][w
]);
new fieldname
[50],
Float:armour;
format(fieldname,
sizeof(fieldname
),
"Weapon%d", w
);
MySQL_SetInteger
(PlayerSQLID
[p
], fieldname, PlayerWeapons
[p
][w
],
"accounts");
format(fieldname,
sizeof(fieldname
),
"Weapon%dAmmo", w
);
MySQL_SetInteger
(PlayerSQLID
[p
], fieldname, PlayerWeaponAmmo
[p
][w
],
"accounts");
GetPlayerArmour
(p, armour
);
MySQL_SetFloat
(PlayerSQLID
[p
],
"Armour", armour,
"accounts");
} } } } return 1;
}
Re: Messed up OnPlayerConnect can someone help me out? -
Dokins - 05.02.2013
SaveWeapons should be under OnPlayerConnect, that's the problem.
Re: Messed up OnPlayerConnect can someone help me out? -
Faisal_khan - 05.02.2013
You will have to make the function SaveWeapon separately then add SaveWeapon(); under your callback.
Here's how I did it:
pawn Код:
public OnPlayerConnect
(playerid
){ new escape
[MAX_PLAYER_NAME
*2],query
[256];
mysql_real_escape_string
(GetName
(playerid
), escape
);
format(query,
sizeof(query
),
"SELECT `id` FROM `accounts` WHERE `PlayerName` = '%s' LIMIT 1", escape
);
mysql_query
(query
);
mysql_store_result
();
if(mysql_num_rows
() > 0) { PlayerSQLID
[playerid
] = mysql_fetch_int
();
new string
[256],ip
[16], pip;
Tazed
[playerid
] = 0;
pip
= GetPlayerIp
(playerid, ip,
sizeof(ip
));
Time
[playerid
] = gettime();
BanTime
[playerid
] = MySQL_GetValue
(PlayerSQLID
[playerid
],
"BanTime",
"accounts");
if(BanTime
[playerid
] > Time
[playerid
]) { format(string,
sizeof(string
),
"You are still {FF0000}BANNED{FFFFFF} from Bone County Roleplay until {FF0000}%s", date
(BanTime
[playerid
]));
SendClientMessage
(playerid, COLOUR_WHITE, string
);
SendClientMessage
(playerid, COLOUR_REALRED,
"{FFFFFF}PLEASE DO {FF0000}NOT{FFFFFF} POST A {FF0000}BAN APPEAL {FFFFFF}as this is a Temporary Ban.");
SetTimerEx
("KickPlayer",
100,false,
"i",playerid
);
// Kicks player in 500ms } if(Time
[playerid
] > BanTime
[playerid
]) // Check when a player connects to see if they have a timestamp, and if they do, check if it exceeds gettime() { MySQL_SetInteger
(PlayerSQLID
[playerid
],
"BanTime",
0,
"accounts");
} if(IsPlayerBanned
(playerid
) == 1) { format(string,
sizeof(string
),
"Your IP:{FF0000} %s{FFFFFF} is {FF0000}BANNED{FFFFFF} from Bone County Roleplay.", pip
);
SendClientMessage
(playerid, COLOUR_WHITE, string
);
format(string,
sizeof(string
),
"PLEASE POST A {FF0000}BAN APPEAL{FFFFFF} ON http://bc-rp.net/forum/");
SendClientMessage
(playerid, COLOUR_WHITE, string
);
SetTimerEx
("KickPlayer",
100,false,
"i",playerid
);
// Kicks player in 500ms } if(BanTime
[playerid
] == 0 && IsPlayerBanned
(playerid
)== 0) { format(string,
sizeof(string
),
"Welcome to %s (SQLID %d)\n\nPlease enter your password below:", HOSTNAME, PlayerSQLID
[playerid
]);
ShowPlayerDialog
(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,
"Login Dialog", string,
"Login",
"Leave");
} } else { new string
[256];
format(string,
sizeof(string
),
"Welcome to %s\n\nPlease create an account by entering a password below:", HOSTNAME
);
ShowPlayerDialog
(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,
"Register Dialog", string,
"Register",
"Leave");
} mysql_free_result
();
format(query,
sizeof(query
),
"%s has connected to the server.", GetNameEx
(playerid
));
foreach
(Player, i
) { if(AdminLevel
[i
] > 0) { SendClientMessage
(i, COLOUR_LIGHTRED, query
);
} } RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
//Liam 2. RemoveBuildingForPlayer
(playerid,
16672,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16735,
-49.2422,
1137.7031,
28.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
65.0313,
1148.2344,
18.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
59.0391,
1181.6797,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
71.1797,
1182.1719,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
66.7969,
1207.1563,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
72.0859,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
73.0938,
1228.0391,
19.0781,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
77.3594,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1308,
76.9297,
1187.2969,
17.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
90.0859,
1147.8828,
16.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
16673,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
16479,
86.2422,
1214.0391,
17.7422,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
78.2578,
1226.8516,
19.3672,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
83.2813,
1225.2656,
19.8203,
0.25);
//liam 3 RemoveBuildingForPlayer
(playerid,
16672,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-294.9688,
1000.9141,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-313.7422,
1010.2500,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-301.8203,
1001.6563,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.6797,
1024.2891,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-230.8594,
957.8672,
15.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-353.6875,
1049.7656,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-228.8281,
1050.7500,
18.8125,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-351.9688,
1062.1719,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
774,
-372.7422,
1066.2813,
17.2500,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-332.4063,
1072.2422,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-289.0625,
1074.9766,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
-342.0781,
1078.4609,
18.7891,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
-334.4531,
1085.9922,
19.0156,
0.25);
RemoveBuildingForPlayer
(playerid,
773,
-291.2578,
1085.0938,
17.6563,
0.25);
RemoveBuildingForPlayer
(playerid,
1294,
-337.8203,
1093.6953,
23.2031,
0.25);
RemoveBuildingForPlayer
(playerid,
16735,
-49.2422,
1137.7031,
28.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
700,
65.0313,
1148.2344,
18.8516,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
59.0391,
1181.6797,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
652,
71.1797,
1182.1719,
16.2656,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
66.7969,
1207.1563,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
72.0859,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
73.0938,
1228.0391,
19.0781,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
77.3594,
1206.8828,
18.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
1308,
76.9297,
1187.2969,
17.9922,
0.25);
RemoveBuildingForPlayer
(playerid,
16000,
110.8125,
1023.9922,
12.6484,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
130.3828,
1029.3516,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
134.8984,
1032.1250,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
137.1328,
1036.2422,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
94.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
108.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
96.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
98.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
91.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
105.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
100.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
107.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.3750,
1085.6719,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
115.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
110.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
112.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
121.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
128.1406,
1076.7891,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
122.9688,
1067.2031,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
124.8750,
1057.2188,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
3221,
119.6484,
1047.6563,
12.6641,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
139.7734,
1052.9609,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
141.6797,
1071.9844,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
141.0391,
1066.7500,
13.7969,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
97.1172,
1107.4141,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
97.2578,
1102.1172,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
16001,
110.6172,
1109.5156,
12.7266,
0.25);
RemoveBuildingForPlayer
(playerid,
16003,
150.2344,
1105.5313,
14.6328,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
98.8359,
1115.2734,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
96.7031,
1112.6719,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
104.1250,
1115.0000,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
109.3984,
1115.0000,
13.8906,
0.25);
RemoveBuildingForPlayer
(playerid,
669,
90.0859,
1147.8828,
16.7813,
0.25);
RemoveBuildingForPlayer
(playerid,
16673,
86.9063,
1182.6641,
21.5391,
0.25);
RemoveBuildingForPlayer
(playerid,
16479,
86.2422,
1214.0391,
17.7422,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
78.2578,
1226.8516,
19.3672,
0.25);
RemoveBuildingForPlayer
(playerid,
1413,
83.2813,
1225.2656,
19.8203,
0.25);
SetPlayerColor
(playerid, COLOUR_WHITE
);
TextDrawHideForPlayer
(playerid, speed
[playerid
]);
TextDrawHideForPlayer
(playerid, fuel
[playerid
]);
SaveWeapons
();
return 1;
//missing return here}//missing brace here//SetTimerEx("DoLoginProcess", 3000, false,"i", playerid);SaveWeapons
(){ for(new p
= 0; p
< MAX_PLAYERS; p
++) { if(LoggedIn
[p
] == 1) { for(new w
= 0; w
< 13; w
++) { GetPlayerWeaponData
(p, w, PlayerWeapons
[p
][w
], PlayerWeaponAmmo
[p
][w
]);
new fieldname
[50],
Float:armour;
format(fieldname,
sizeof(fieldname
),
"Weapon%d", w
);
MySQL_SetInteger
(PlayerSQLID
[p
], fieldname, PlayerWeapons
[p
][w
],
"accounts");
format(fieldname,
sizeof(fieldname
),
"Weapon%dAmmo", w
);
MySQL_SetInteger
(PlayerSQLID
[p
], fieldname, PlayerWeaponAmmo
[p
][w
],
"accounts");
GetPlayerArmour
(p, armour
);
MySQL_SetFloat
(PlayerSQLID
[p
],
"Armour", armour,
"accounts");
} } } return 1;
}
Re: Messed up OnPlayerConnect can someone help me out? -
Dokins - 05.02.2013
Thank you!