Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: mrockxkingbutt on December 16, 2012, 05:10:11 pm
-
i try to make a cuff cmd
i use
[pawn]
else if ( strcmp( cmd, "cuff", true ) == 0 )
{
new reason[ 256 ], szMsg[ 128 ], plr;
tmp = strtok( cmdtext, idx ), reason = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c cuff [Nick/ID]
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
else
{
format( szMsg, sizeof( szMsg ), "Admin %s Freezed player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
SendClientMessageToAll( COLOR_GREEN, szMsg );
TogglePlayerControllable( plr, 0 );
}
return 1;
}[/pawn]
but it not stop a player
there is a line missed
give me the line ple
line of player dissconnect when i go near to him
-
Hi . I new
I just want to tell you if you can write moderately so I can translate it and can help you with something!
The cmd should actually be so. Do not really understand what your problem
:
[pawn]else if ( strcmp( cmd, "cuff", true ) == 0 )
{
new reason[ 256 ], szMsg[ 128 ], plr;
tmp = strtok( cmdtext, idx ), reason = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c cuff [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
else
{
format( szMsg, sizeof( szMsg ), "Admin %s Freezed player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
SendClientMessageToAll( COLOR_GREEN, szMsg );
TogglePlayerControllable( plr, 0 );
}
return 1;
} [/pawn]
I unfortunately do not see the problem in cmd. I want you to tell me what it is!