forward OnCrimeAddOffline(iPlayerID, szAddCrime[], szPName[], iExtra);
public OnCrimeAddOffline(iPlayerID, szAddCrime[], szPName[], iExtra)
{
new
iRows,
iTempID;
iRows = cache_get_row_count(MainPipeline);
switch(iExtra) {
case 0: {
if(!iRows) return SendClientMessageEx(iPlayerID, 0xFFFFFF, "That player was not found!");
iTempID = cache_get_field_content_int(iRows, "id", MainPipeline);
format(szMiscArray, sizeof(szMiscArray), "INSERT INTO `mdc` (`id` ,`time` ,`issuer` ,`crime`, `origin`) VALUES ('%d',NOW(),'%s','%s','%d')", iTempID, GetPlayerNameEx(iPlayerID), szAddCrime, arrGroupData[PlayerInfo[iPlayerID][pMember]][g_iAllegiance]);
mysql_function_query(MainPipeline, szMiscArray, true, "OnCrimeAddOffline", "dssd", iPlayerID, szAddCrime, szPName, 1);
DeletePVar(iPlayerID, "OfflineSU");
}
case 1: {
if(!cache_affected_rows(MainPipeline)) return SendClientMessageEx(iPlayerID, 0xFFFFFF, "There was an issue appending that crime!");
format(szMiscArray, sizeof(szMiscArray), "Crime Added: %s - %s", szPName, szAddCrime);
SendClientMessage(iPlayerID, 0xFFFFFF, szMiscArray);
}
}
return 1;
}
public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
{
new string[100];
printf("Error ID: %i", errorid);
printf("Error: %s", error);
printf("Callback: %s", callback);
printf("Query: %s", query);
return 1;
}
Check server logs for the error, if none are present, add this somewhere inside of your gamemode, re run the command and review the errors.
PHP код:
|