Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: YoMan on March 03, 2012, 02:39:34 pm

Title: Cmd Problem
Post by: YoMan on March 03, 2012, 02:39:34 pm
guys i made this cmd to !gotoloc with vehicle but its not working

Code: [Select]
    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;
    }

help me
Title: Re: Cmd Problem
Post by: SaFeeR on March 04, 2012, 02:45:07 am
Code: [Select]
    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 );
else
{
    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;
    }

try this
not tested
leave a comment if its work or not
Title: Re: Cmd Problem
Post by: power on March 08, 2012, 09:58:29 pm
I WANT HELP IN SCRIPTING I WANNA ADD KILLP CMD AND SLAP TELL ME PLEASE
IAM NEW SCRIPTER AND HAVE LOTS OF IDEAS TO MAKE PWN GREAT SCRIPTS THAN ANY NOT
PWN HELP ME SCRIPTERS PLEASE
Title: Re: Cmd Problem
Post by: YoMan on March 09, 2012, 12:23:38 am
u have to make a topic then i will give u