Dealership help
#1

Hello, i'll need some help.

PHP код:
CMD:teemasin(playeridparams[])
{
    new 
id;
    new 
caridhindcolor1color2;
    new 
Float:cPosXFloat:cPosYFloat:cPosZFloat:cPosA;
    
//Code deleted, write new please. 
        //USE:/teemasin [carid][price][col1][col2]
    
CarInfo[id][mMudel] = carid//car id
    
CarInfo[id][mHind] = hind// price
    
CarInfo[id][mOmanik] = 0//owner
    
CarInfo[id][mPosX] = cPosX
    
CarInfo[id][mPosY] = cPosY;
    
CarInfo[id][mPosZ] = cPosZ;
    
CarInfo[id][mPosA] = cPosA;
    
CarInfo[id][mLukus] = 0;
    
CarInfo[id][mDealership] = 1;
    
CarInfo[id][mV2rv1] = color1;
    
CarInfo[id][mV2rv2] = color2;
    
    new 
file4[40];
    
format(file4sizeof(file4), BPATHid);
    new 
INI:File INI_Open(file4);
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"mMudel"CarInfo[id][mMudel]);
    
INI_WriteInt(File,"mHind"CarInfo[id][mHind]);
    
INI_WriteString(File,"mOmanik"CarInfo[id][mOmanik]);
    
INI_WriteFloat(File,"mPosX"CarInfo[id][mPosX]);
    
INI_WriteFloat(File,"mPosY"CarInfo[id][mPosY]);
    
INI_WriteFloat(File,"mPosZ"CarInfo[id][mPosZ]);
    
INI_WriteFloat(File,"mPosA"CarInfo[id][mPosA]);
    
INI_WriteInt(File,"mLukus"CarInfo[id][mLukus]);
    
INI_WriteInt(File,"mDealership"CarInfo[id][mDealership]);
    
INI_WriteInt(File,"mV2rv1"CarInfo[id][mV2rv1]);
    
INI_WriteInt(File,"mV2rv2"CarInfo[id][mV2rv2]);
    
INI_Close(File);
    return 
1;

Reply
#2

And what's the problem?
Reply
#3

i dont know how to make this command....
/teemasin [carid][price][col1][col2]
if(sscanf(params, "", vehicle, hind, color1, color2))
Reply
#4

Quote:
Originally Posted by EstSampBro
Посмотреть сообщение
i dont know how to make this command....
/teemasin [carid][price][col1][col2]
if(sscanf(params, "", vehicle, hind, color1, color2))
pawn Код:
if(sscanf(params, "%d,%d,%d,%d", vehicle, hind, color1, color2))
P.S what's hind? Is it supposed to be a number or? If it's supposed to be a number leave it like this.

Hope I helped
Reply
#5

hind = price in estonian
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)