Quote:
Originally Posted by Grim_
I really suggest you switch to ZCMD for faster and more efficient command processing.
The following code is untested:
pawn Код:
if( !strcmp( cmdtext, "/slap", true ) ) { if( !cmdtext[ 5 ] ) return 0; // No parameters entered if( !IsPlayerConnected( strval( cmdtext[ 6 ] ) ) ) return 0; // target not connected new Float: Pos[ 3 ]; GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] ); SetPlayerPos( strval( cmdtext[ 6 ] ), Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] ); return 1; }
Obviously, this is the base of the command. Adjust as necessary.
|
i hate zcmd i prefer the oldschool stuff dont worry thanks anyway