if(tempdoorobj[playerid]){
if(response==EDIT_RESPONSE_FINAL){
new id,m[512],Cache:result;
id = GetFreeDynamicGateID();
DynamicGate[id][door_pos][0] = fX;
DynamicGate[id][door_pos][1] = fY;
DynamicGate[id][door_pos][2] = fZ;
DynamicGate[id][door_rpos][0] = fRotX;
DynamicGate[id][door_rpos][1] = fRotY;
DynamicGate[id][door_rpos][2] = fRotZ;
DynamicGate[id][door_id] = id;
DynamicGate[id][door_vw] = GetPlayerVirtualWorld(playerid);
DynamicGate[id][door_int] = GetPlayerInterior(playerid);
mysql_format(dbhandle, m, sizeof(m), "INSERT INTO gates (x,y,z,rx,ry,rz,vw,g_int) VALUES ('%f','%f','%f','%f','%f','%f','%i','%i')", DynamicGate[id][door_pos][0],DynamicGate[id][door_pos][1],DynamicGate[id][door_pos][2],DynamicGate[id][door_rpos][0],DynamicGate[id][door_rpos][1],DynamicGate[id][door_rpos][2],DynamicGate[id][door_vw],DynamicGate[id][door_int]);
result = mysql_query(dbhandle, m,true);
DynamicDoor[id][door_sqlid]=cache_insert_id();
cache_delete(result);
SendClientMessageEx(playerid, COLOR_GREY, "Gate created successfully, Game ID: %i and SQLID: %i",DynamicGate[id][door_id],DynamicGate[id][door_sqlid]);
DestroyObject(tempdoorobj[playerid]);
DynamicGate[id][door_object] = CreateDynamicObject(DynamicGate[id][door_model],DynamicGate[id][door_pos][0], DynamicGate[id][door_pos][1], DynamicGate[id][door_pos][2], DynamicGate[id][door_rpos][0], DynamicGate[id][door_rpos][1], DynamicGate[id][door_rpos][2], DynamicGate[id][door_vw], DynamicGate[id][door_int], -1, 300.0, 300.0, -1, 0);
}
}
result = mysql_query(dbhandle, m,true);
DynamicDoor[id][door_sqlid]=cache_insert_id();
cache_delete(result);
warning 213: tag mismatch
new Cache:result
new result
enum dynamicdoorenum{
door_sqlid,
door_id,
Float:door_pos[3],
Float:door_rpos[3],
door_owner,
door_faction,
door_group,
door_object,
door_model,
door_vw,
door_int
}
if(response==EDIT_RESPONSE_FINAL)
if(response)
if(response && pEditResponse[playerid] > 0)
Reading your code a second time I noticed this:
pawn Код:
pawn Код:
Edit: if you want to check a condition along with the response, just add another condition: pawn Код:
|
DynamicDoor[id][door_sqlid]=cache_insert_id();
DynamicGate[id][door_sqlid]=cache_insert_id(); |
DynamicDoor[id][door_sqlid]=cache_insert_id(); |