1
mIRC/pawn Scripting / Can u Tell me?
« on: April 14, 2012, 11:53:57 pm »
hy guys can u tell me that what is the use of it
OnRconCommand(cmdtext[])
PAWN
OnRconCommand(cmdtext[])
PAWN
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
else if ( strcmp( cmd, "!giveheal", true ) == 0 )
{
new snick[ 128 ], plr, szMsg[ 128 ];
snick = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( snick );
if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
else
{
format( szMsg, sizeof( szMsg ), "%s Give Health to %s", gPlayers[ playerid ], gPlayers[ plr ]);
SendClientMessageToAll( COLOR_GREEN, szMsg );
SetPlayerHealth( plr, 100.0 );
GameTextForPlayer( plr,"Thanks Him", gPlayers[ playerid ]);
}
return 1;
}
else if ( strcmp( cmd, "!forum", true ) == 0 )
{
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else
{
SendClientMessage( playerid, COLOR_GREEN, "[English]Register on this website www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[Espanol]Registrarse en este sitio web www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[Portugues]Registre se neste site www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[France]Inscrivez vous sur ce site Web www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[Vietnam]dang ky tren trang Web nay www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[Turkey]Bu Web Sitesinde Kayit www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[Italian]Registrati su questo sito www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[Latin]Subcriptio in hoc Website www.bsgclan.smffy.com" );
SendClientMessage( playerid, COLOR_GREEN, "[Swedish]Registrera dig pa denna webbplats www.bsgclan.smffy.com" );
}
return 1;
}
else if ( strcmp( cmd, "!gotoloc", true ) == 0 )
{
new vehicle;
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !gotoloc [Name]" );
else
{
new splitx[ 3 ][ 128 ], szMsg[ 128 ];
if ( !IsLocationExist( tmp ) )
{
format( szMsg, sizeof( szMsg ), "Location:[ %s ] does not exist.", tmp );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
return 1;
}
split( dini_Get( "/SavedLocations/Locations.ini", tmp ), splitx, ' ' );
SetPlayerPos( playerid, floatstr( splitx[ 0 ] ), floatstr( splitx[ 1 ] ), floatstr( splitx[ 2 ] ), 0, 0 );
SetVehiclePos( vehicle, floatstr( splitx[ 0 ] ), floatstr( splitx[ 1 ] ), floatstr( splitx[ 2 ] ), 0, 0 );
format( szMsg, sizeof( szMsg ), "Teleporting to location:[ %s ]", tmp );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
}
return 1;
}