16
mIRC/pawn Scripting / Re: Need Cmds
« on: February 13, 2012, 10:21:04 pm »
Shadow thanks for reply but when i use /c respawn bla bla and getcar again it will not come can u made a right cmd for getcar and mute plzzz
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, "nogoto", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c nogoto [on/off]" );
else
{
if ( strcmp( tmp, "on", true ) == 0 )
{
SendClientMessage( playerid, COLOR_GREEN, "Nogoto Enabled." );
PlayerInfo[ playerid ][ NoGoto ] = 1;
UpDateFile( USERS_FILE, gPlayers[ playerid ], "NoGoto", "1" );
}
else if ( strcmp( tmp, "off", true ) == 0 )
{
SendClientMessage( playerid, COLOR_GREEN, "Nogoto Disabled." );
PlayerInfo[ playerid ][ NoGoto ] = 0;
UpDateFile( USERS_FILE, gPlayers[ playerid ], "NoGoto", "0" );
}
else SendClientMessage( playerid, COLOR_GREEN, "Syntax Error! USAGE: /c nogoto [on/off]" );
}
return 1;
}
this is nogoto cmd else if ( strcmp( cmd, "!report", true ) == 0 )
{
new tmp2[ 256 ], plr;
tmp = strtok( cmdtext, idx ), tmp2 = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
if ( !strlen(tmp2) ) SendClientMessage( playerid, GREEN, "USAGE: !report [Nick/ID] [Reason]" );
else
{
if ( plr != INACTIVE_PLAYER_ID )
{
new string[ 256 ];
format( szMsg, sizeof( szMsg ), "%s has been reported! Reason:[ %s ]", gPlayers[ plr ],tmp2);
SendClientMessage( playerid, COLOR_GREEN, szMsg );
format( string, 256, "ReportBy: %s ; Reason: %s", gPlayers[ playerid ], gPlayers[ plr ],tmp2);
dini_Set("/Reports/Reports.ini", gPlayers[ plr ], string );
}
else SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
}
return 1;
}
else if ( strcmp( cmd, "getip", true ) == 0 )
{
new plr; tmp = strtok( cmdtext, idx ); plr = FindPlayerIDFromString( tmp );
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: /c getip [Nick/ID]" );
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
else
{
new szMsg[ 128 ], IP[ 24 ];
GetPlayerIp( plr, IP, 24 );
format( szMsg, 128, "%s's IP:[ %s ]", gPlayers[ plr ], IP );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
}
return 1;
}