14.10.2012, 18:22
Код:
wcrp\admin.pwn(469) : error 017: undefined symbol "mysql_function_query" wcrp\admin.pwn(543) : warning 219: local variable "Z" shadows a variable at a preceding level wcrp\admin.pwn(607) : error 001: expected token: ")", but found "-string-" wcrp\admin.pwn(607) : warning 215: expression has no effect wcrp\admin.pwn(607) : warning 215: expression has no effect wcrp\admin.pwn(607) : error 001: expected token: ";", but found ")" wcrp\admin.pwn(607) : error 029: invalid expression, assumed zero wcrp\admin.pwn(607) : fatal error 107: too many error messages on one line
Код:
new ajailtimer; #pragma unused ajailtimer adminOnGameModeInit() { for(new i=0;i<sizeof(admincmdalts);i++) { Command_AddAltNamed( admincmdalts[i][EACmdAltName], admincmdalts[i][EACmdAltAltName]); } ajailtimer = SetTimer("AJailTimer", 5000, true); mysql_function_query(g_mysql_handle, "SELECT `motd`,`amotd` FROM `misc`", true, "OnLoadMOTD", ""); }
Код:
mysql_function_query(g_mysql_handle, "SELECT `motd`,`amotd` FROM `misc`", true, "OnLoadMOTD", "");
Quote:
YCMD:getpos(playerid, params[], help) { if(help) { SendClientMessage(playerid, X11_WHITE, "Gets a players position"); return 1; } new Float:X,Float:Y,Float:Z,Float:A; new interior, vw, playa; new msg[128]; if(!sscanf(params,"u", playa)) { if(!IsPlayerConnectEx(playa)) { SendClientMessage(playerid, X11_TOMATO_2, "User not found"); return 1; } GetPlayerPos(playa, X, Y, Z); GetPlayerFacingAngle(playa, A); interior = GetPlayerInterior(playa); vw = GetPlayerVirtualWorld(playa); format(msg, sizeof(msg), "%s's pos: X: %f Y: %f Z: %f Angle: %f",GetPlayerNameEx(playa, ENameType_CharName), X, Y, Z, A); SendClientMessage(playerid, X11_WHITE, msg); format(msg, sizeof(msg), "Interior: %d Virtual World: %d", interior, vw); SendClientMessage(playerid, X11_WHITE, msg); if(IsPlayerInAnyVehicle(playa)) { new carid = GetPlayerVehicleID(playa); GetVehiclePos(carid, X, Y, Z); vw = GetVehicleVirtualWorld(carid); GetVehicleZAngle(carid, A); format(msg, sizeof(msg), "Vehicle %d's pos: X: %f Y: %f Z: %f Angle: %f",carid, X, Y, Z, A); SendClientMessage(playerid, X11_WHITE, msg); format(msg, sizeof(msg), "Virtual World: %d", vw); SendClientMessage(playerid, X11_WHITE, msg); } } else { SendClientMessage(playerid, X11_WHITE, "USAGE: /getpos [playerid/name]"); } return 1; } |
Quote:
new Float:X,Float:Y,Float:Z,Float:A; |
Код:
YCMD:unban(playerid, params[], help) { if(help) { SendClientMessage(playerid, X11_WHITE, "Unbans a player"); return 1; } new name[(MAX_PLAYER_NAME*2)+1]; query[0] = 0;//[256]; if(sscanf(params,"s[" #MAX_PLAYER_NAME "]",name) mysql_real_escape_string(name, name); format(query, sizeof(query), "DELETE FROM `bans` WHERE `accountid` = (SELECT `id` FROM `accounts` WHERE `username` = \"%s\")",name); mysql_function_query(g_mysql_handle, query, true, "BanDeleteCallback", "dds",playerid, 0, name); } else { SendClientMessage(playerid, X11_WHITE, "USAGE: /unban [accountname]"); } return 1; }
Код:
if(sscanf(params,"s[" #MAX_PLAYER_NAME "]",name)