03.11.2016, 17:57
Hello,
when i run this code, the info goes in another enum and overwrites.
When i remove this:
Then it doesn't occur anymore.
What did i do wrong here?
when i run this code, the info goes in another enum and overwrites.
PHP код:
else if(!strcmp(tmp, "factionize", true, 9))
{
new query[200];
new vehicleid = GetPlayerNearestVehicle(playerid);
new factionid = strlen(tmp2);
if(GetDistanceFromPlayerToVehicle(playerid, vehicleid) > 5.0)
return SendClientError(playerid, "There is no vehicle around you!");
if(!strlen(tmp2)) return SendClientUsage(playerid, "/av factionize [FactionID]");
format(query,sizeof(query),"UPDATE vehicles SET vOwner='%s',vFaction='%i' WHERE id='%i'",Faction1337[factionid][factionName],factionid,vehicleid);
mysql_tquery(connection,query,"");
myStrcpy(Vehicle[vehicleid][vOwner], Faction1337[factionid][factionName]);
Vehicle[vehicleid][vFaction] = factionid;
SendStaffMessage(playerid,sprintf("This %s has been factionized for faction %s",GetVehicleName(vehicleid),Faction1337[factionid][factionName]));
}
PHP код:
myStrcpy(Vehicle[vehicleid][vOwner], Faction1337[factionid][factionName]);
What did i do wrong here?