08.04.2013, 13:38
Hi guys! I need to use a command with params. So, if i type just /arrest i will get the message with "usage: /arrest id but if i type: /arest id:9 for example, i will get that message with /leave - for exit... Also if you guys have a better idea to make these commands work under this if ( PlayerInfo[ playerid ][ ActionID ] == 8 ) ...
pawn Код:
public OnPlayerCommandReceived( playerid, cmdtext[ ] )
{
if ( PlayerInfo[ playerid ][ ActionID ] == 8 )
{
if ( !strcmp( cmdtext, "/leave", true ) || !strcmp( cmdtext, "/arrest", true ) || !strcmp( cmdtext, "/neon", true ) || !strcmp( cmdtext, "/radio", true ) ) return ( 1 );
Announce( playerid, "~g~~h~Use ~r~~h~/leave ~g~~h~for exit.", 3000, 4 );
return ( 0 );
}
}