07.07.2016, 22:23
Your command mean nothing. Why have you a loop?
Try this :
Try this :
PHP код:
CMD:createpickupjob(playerid, params[])
{
print("Starting command...")
new idpickup, jobtype[64], nivrequis, vwtd=-1, INTTDPick;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(sscanf(params,"isii", idpickup, jobtype, nivrequis, INTTDPick)) return SendClientMessage(playerid, -1,"[CMD]: /createpickupjob [IDPickup] [Job] [Niv] [PickupINT]");
CreateDynamicPickup(idpickup, 1, x, y, z, vwtd);
printf("nivrequis: %i | x:%.2f | y:%.2f | z:%.2f | idpickup : %i | vwtd : %i | INTTDPick : %i", nivrequis, x, y, z, idpickup, vwtd, INTTDPick);
InfoTextDrawJob[r][LevelRQ] = nivrequis;
InfoTextDrawJob[r][InTextX] = x;
InfoTextDrawJob[r][InTextY] = y;
InfoTextDrawJob[r][InTextZ] = z;
InfoTextDrawJob[r][IDPickup] = idpickup;
InfoTextDrawJob[r][PickupVW] = vwtd;
InfoTextDrawJob[r][PickupINT] = INTTDPick;
new query[450];
print("Saving MYQSL params")
mysql_format(g_iHandle, query, sizeof(query), "INSERT INTO `srv_td_job` (`InTextX` ,`InTextY`,`InTextZ`) VALUES (%f, %f, %f)", x, y, z);
mysql_tquery(g_iHandle, query);
return 1;
}