sscanf questions
#5

The params, in this case, is a string. Then you have to convert String in Integer with strval.

Examples:

Search ID with isnull
Код:
if(isnull(params))
{
    // code to return false
}
else // code to return true
{
    if(IsPlayerConected(strval(params)))
    {
        // Player Conected
    }
}
Search ID with sscanf
Код:
new Target;
if(sscanf(params, "i", Target))
{
    // code to return false
}
else // code to return true
{
    if(IsPlayerConected(Target))
    {
        // Player Conected
    }
}
Reply


Messages In This Thread
sscanf questions - by sam29 - 01.06.2016, 19:52
Re: sscanf questions - by Konstantinos - 01.06.2016, 19:56
Re: sscanf questions - by sam29 - 01.06.2016, 19:58
Re: sscanf questions - by Konstantinos - 01.06.2016, 20:00
Re: sscanf questions - by F1N4L - 01.06.2016, 20:04

Forum Jump:


Users browsing this thread: 1 Guest(s)