22.12.2011, 21:28
try to add SendClientMessage(playerid,-1,iMsg); out of loop... something like that:
i dont now is it going to works.. but try
pawn Code:
CMD:myveh(playerid, params[])
{
new Query[300], pname[24], vID;
GetPlayerName(playerid, pname, 24);
format(Query, sizeof(Query),"SELECT vID FROM `vehicles` WHERE `vOwner` = '%s' ", pname);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() > 0) {
while(mysql_fetch_row(Query)) {
sscanf(Query, "p<|>i",vID);
// printf("VID:\t\t%i", vID);
for(new i=1;i<MAX_VEHICLES;i++) {
new iMsg[128];
if(strmatch(vInfo[OwnedVeh(i)][vOwner], pName(playerid))) {
format(iMsg,sizeof(iMsg), ""#CRED">"#CORANGE"'%s' "#CDGREEN"You Own Model:"#CORANGE"%i"#CDGREEN " CarID:"#CORANGE"%i"#CRED"<",pName(playerid),vInfo[OwnedVeh(i)],vID);
}
SendClientMessage(playerid,-1,iMsg);
}
}
mysql_free_result();
}
return 1;
}