String / strreplace Problem [URGENT]
#1

I have this file called house1.dudb

In this file the following contains.

pawn Код:
CurrentOwner=Vacant_House
HouseName=Null_Property
ForSale=1
HouseSize=Small
CurrentPrice=2000000
PropertyTaxesPerWeek=1250
TimesPurchased=11
CarSaving=Yes
Car=545,1968.5608,-1156.5552,20.7764,273.4174,47,1,60

I want the car co ordinates to make a vehicle spawn. Here is the command.

pawn Код:
if(strcmp(cmd, "/testcar", true) == 0) {
    new modelid,
     Float:floatx,
     Float:floaty,
     Float:floatz,
     Float:angle,
     color1,
     color2,
     respawn_delay;

       new housefile[100];
       format(housefile,sizeof(housefile),"House9Information");
       new Information = dUserINT(housefile).("Car");
       format(string,sizeof(string),"%d",Information);


     new sstring[sizeof(string)];
     format(sstring, sizeof(sstring), "%s", string);
     strreplace(",", " ", sstring);
     sscanf(sstring, "dffffddd", modelid, floatx, floaty, floatz, angle, color1, color2, respawn_delay);
     CreateVehicle(modelid, floatx, floaty, floatz, angle, color1, color2, respawn_delay);
     
     
     printf("%d %f %f %f %f %d %d %d",modelid, floatx, floaty, floatz, angle, color1, color2, respawn_delay);
     return 1;

     }
It dont spawn the car, But i printed it to see what comes out and it gave me this.

[15:30:40] 545,0.000000,0.000000,0.000000,0.000000,0,0,0

Reply


Messages In This Thread
String / strreplace Problem [URGENT] - by Kyle - 28.04.2010, 15:17
Re: String / strreplace Problem [URGENT] - by Nero_3D - 28.04.2010, 15:31
Re: String / strreplace Problem [URGENT] - by Kyle - 28.04.2010, 15:52
Re: String / strreplace Problem [URGENT] - by dice7 - 28.04.2010, 15:56
Re: String / strreplace Problem [URGENT] - by Kyle - 28.04.2010, 16:16
Re: String / strreplace Problem [URGENT] - by dice7 - 28.04.2010, 16:22
Re: String / strreplace Problem [URGENT] - by Kyle - 28.04.2010, 16:33
Re: String / strreplace Problem [URGENT] - by MadeMan - 28.04.2010, 18:16

Forum Jump:


Users browsing this thread: 1 Guest(s)