01.01.2011, 12:42
Why would you use sscanf with just one parameter?
And the original problem is caused because you return 0 at the end of command. You only need to do that in OnPlayerCommandText callback.
pawn Код:
dcmd_land(playerid, params[])
{
new ap, name[ MAX_PLAYER_NAME ];
if( isnull( params ) ) return SendClientMessage( playerid, 0xFF0000AA, "USAGE: /land [ls/lv/sf]" );
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
if( !strcmp( params, "ls", true ) )
{
// Landing at los santos
}
else if( !strcmp( params, "lv", true ) )
{
// Landing at las venturas
}
else if( !strcmp( params, "sf", true ) )
{
// Landing as san fierror
}
return 1;
}