float 1 and 2.
#2

Depends, what floats are you getting?
the float the player inputs, or some other float?

if you search for the input, use sscanf..
simple command:
pawn Код:
CMD:output(playerid,params[])
{
    new Float:f1,Float:f2;//make a new float var
    if(sscanf(params,"ff",f1,f2)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /output <float1><float2>");//detect if the player has put in the floats
    new Float:output = f1+f2;//count the floats
    new string[128];//create string var
    format(string,sizeof(string),"These two floats output: %f",output);//format the string var with our output
    SendClientMessage(playerid,COLOR_WHITE,string);//send a message containing the formatted string
    return 1;
}
this will count the floats to eachother
Reply


Messages In This Thread
float 1 and 2. - by TaLhA XIV - 09.08.2012, 17:18
Re: float 1 and 2. - by Jstylezzz - 09.08.2012, 17:26

Forum Jump:


Users browsing this thread: 1 Guest(s)