09.08.2012, 17:26
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:
this will count the floats to eachother
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;
}