20.01.2010, 05:39
Hello, i have ran into a problem again
I have tried for 5 hours to resolve this problem, but i really cant seem to beat it.
My problem is basically this, it should write the ComponentId into my .Cfg file, but instead of that, it writes all kinds of symbols into it.

I have tried for 5 hours to resolve this problem, but i really cant seem to beat it.My problem is basically this, it should write the ComponentId into my .Cfg file, but instead of that, it writes all kinds of symbols into it.

pawn Код:
//It should write the componentid as cMod1 but it doesnt for some reason
public OnVehicleMod(playerid, vehicleid, componentid)
{
new playerid20 = GetDriverID(vehicleid);
if(GetPlayerState(playerid20) == PLAYER_STATE_DRIVER) {
if(IsAnOwnableCar(vehicleid))
{
for(new s=0; s<20; s++) {
if(componentid == spoiler[0]) {
CarInfo[vehicleid][cMod1] = componentid;
}
}
for(new s=0; s<3; s++) {
if(componentid == nitro[0]) {
CarInfo[vehicleid][cMod2] = componentid;
}
}
for(new s=0; s<23; s++) {
if(componentid == fbumper[0]) {
CarInfo[vehicleid][cMod3] = componentid;
}
}
for(new s=0; s<22; s++) {
if(componentid == rbumper[0]) {
CarInfo[vehicleid][cMod4] = componentid;
}
}
for(new s=0; s<28; s++) {
if(componentid == exhaust[0]) {
CarInfo[vehicleid][cMod5] = componentid;
}
}
for(new s=0; s<2; s++) {
if(componentid == bventr[0]) {
CarInfo[vehicleid][cMod6] = componentid;
}
}
for(new s=0; s<2; s++) {
if(componentid == bventl[0]) {
CarInfo[vehicleid][cMod7] = componentid;
}
}
for(new s=0; s<4; s++) {
if(componentid == bscoop[0]) {
CarInfo[vehicleid][cMod8] = componentid;
}
}
for(new s=0; s<13; s++) {
if(componentid == rscoop[0]) {
CarInfo[vehicleid][cMod9] = componentid;
}
}
for(new s=0; s<21; s++) {
if(componentid == lskirt[0]) {
CarInfo[vehicleid][cMod10] = componentid;
}
}
for(new s=0; s<21; s++) {
if(componentid == rskirt[0]) {
CarInfo[vehicleid][cMod11] = componentid;
}
}
for(new s=0; s<1; s++) {
if(componentid == hydraulics[0]) {
CarInfo[vehicleid][cMod12] = componentid;
}
}
for(new s=0; s<1; s++) {
if(componentid == base[0]) {
CarInfo[vehicleid][cMod13] = componentid;
}
}
for(new s=0; s<2; s++) {
if(componentid == rbbars[0]) {
CarInfo[vehicleid][cMod14] = componentid;
}
}
for(new s=0; s<2; s++) {
if(componentid == fbbars[0]) {
CarInfo[vehicleid][cMod15] = componentid;
}
}
for(new s=0; s<17; s++) {
if(componentid == wheels[0]) {
CarInfo[vehicleid][cMod16] = componentid;
}
}
for(new s=0; s<2; s++) {
if(componentid == lights[0]) {
CarInfo[vehicleid][cMod17] = componentid;
}
}
OnPropUpdate();
return 1;
}
}
return 0;
}


