case GX_MYSQL_GET_EVENT_TELES:
{
// Check if the player is still connected
if (IsPlayerConnected(extraid))
{
// Store the result
mysql_store_result(GXSQLDBPointer);
// Set the number of teles added
EventTeleports = mysql_num_rows(GXSQLDBPointer);
format(strTempString,sizeof(strTempString),"* DEBUG : I found %d teleports for this event !",EventTeleports);
SendClientMessageToAll(COLOR_YELLOW,strTempString);
if (mysql_num_rows(GXSQLDBPointer) >= 1)
{
// Create variables
new ResultlineTeleport[300];
// Make the teleport array from SQL Query
for(new i=0; i<mysql_num_rows(GXSQLDBPointer); i++)
{
mysql_fetch_row_format(ResultlineTeleport);
printf(ResultlineTeleport);
sscanf(ResultlineTeleport,"p<|>ffff",EventRandomTeleports[i][0],EventRandomTeleports[i][1],EventRandomTeleports[i][2],EventRandomTeleports[i][3]);
}
}
// Caca
for(new i=0; i<EventTeleports; i++)
{
for(new j=0; j<4; j++)
{
format(strTempString,sizeof(strTempString),"** %d %f",i,EventRandomTeleports[i][j]);
SendClientMessageToAll(0xFFFFFFFF,strTempString);
}
}
}
mysql_free_result();
// Exit here
return 1;
}
|
[13:28:32] 0|0|0|0 [13:28:32] -2656.78|633.921|14.4531|174.321 [13:28:32] -2666.4|625.058|14.4531|130.6 [13:28:32] -2662.34|610.599|14.4531|210.731 |