19.11.2017, 14:24
Quote:
Show me "SetPlayerCamera" custom function and "CheckBanList" callback
|
PHP код:
function:CheckBanList(playerid)
{
if(!cache_num_rows())
{
new existCheck[129];
mysql_format(ourConnection, existCheck, sizeof(existCheck), "SELECT acc_dbid FROM masters WHERE acc_name = '%e'", ReturnName(playerid));
mysql_tquery(ourConnection, existCheck, "LogPlayerIn", "i", playerid);
}
else
{
SendServerMessage(playerid, "Your IP \"%s\" is banned from our servers.", ReturnIP(playerid));
SendServerMessage(playerid, "You may appeal your ban on our forums.");
return KickEx(playerid);
}
return 1;
}
PHP код:
function:SetPlayerCamera(playerid)
{
new rand = random(3);
switch(rand)
{
case 0:
{
SetPlayerCameraPos(playerid, 1249.3018, -1697.8046, 99.9554);
SetPlayerCameraLookAt(playerid, 1249.6576, -1696.8656, 99.4902);
}
case 1:
{
SetPlayerCameraPos(playerid, 2151.2539, -1894.5447, 85.3924);
SetPlayerCameraLookAt(playerid, 2150.5833, -1893.8066, 84.6774);
}
case 2:
{
SetPlayerCameraPos(playerid, 2169.0635, -1740.4182, 112.0308);
SetPlayerCameraLookAt(playerid, 2170.0603, -1740.3655, 111.3108);
}
}
return 1;
}