08.07.2011, 11:46
Simple, you need FOREACH include, just search in ******, don't be lazy okay?
pawn Код:
// A simple replace for your command ( messageon and messageoff )
if ( !strcmp( cmdtext, "/messages", true ) )
{
SetPVarInt( playerid, "SendJumpMessage", ( GetPVarInt( playerid, "SendJumpMessage" ) == 1 ) ? 0 : 1 );
switch ( GetPVarInt( playerid, "SendJumpMessage" ) )
{
case 0 : SendClientMessage( playerid, COLOR_YELLOW, "Jump messages are now on." );
case 1 : SendClientMessage( playerid, COLOR_YELLOW, "Jump messages are now off." );
}
return 1;
}
// Example teleport cmd
if ( !strcmp( cmdtext, "/middleOfSA", true ) )
{
SetPlayerPos( playerid, 0.0, 0.0, 0.0 + 3.0 );
foreach (Player, i)
{
if ( GetPVarInt( i, "SendJumpMessage" ) == 0 )
{
new
string[ 128 ], name[ 24 ]
;
GetPlayerName( playerid, name, sizeof ( name ) );
format( string, sizeof ( string ), "* [ID: %d] %s has teleported to /middleOfSA", playerid, name );
SendClientMessage( i, COLOR_WHITE, string );
}
}
return 1;
}
// Sorry for crappy indentation