Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: andr on February 24, 2013, 11:48:59 am
-
command !getcar BUG
i type !getcar 130
but it's not spawn
and quit the game go in again the spawn car will appear
Sorry for my bad english
[pawn] else if (strcmp(cmd, "!getcar", true) == 0){
tmp = strtok(cmdtext, idx);
new len = strlen(tmp);
new Float:angle;
if (!len) { format(szMsg,sizeof(szMsg),"Usage: !getcar <car/id>",tmp);
SendClientMessage(playerid, COLOR_GREY, szMsg);return 1;}
newvar = strval(tmp);
if (GetPlayerMoney(playerid) >= 1800){
if (newvar < 130 || newvar > 239) {
format(szMsg,sizeof(szMsg),"Unable to find %s.",tmp);
SendClientMessageToAll(COLOR_GREY, szMsg);
} else {
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,angle);
newvar = CreateVehicle(newvar,x,y,z,angle,-1,-1);
PutPlayerInVehicle(playerid,newvar);
PutDirectlyInVehicle(playerid,newvar);
format(szMsg,sizeof(szMsg),"Found %s.",tmp);
}
} else {
SendClientMessage(playerid,COLOR_GREEN,"You don't have 1800 dollars!");
}
return 1;[/pawn]
-
Chek that
[pawn]else if ( strcmp( cmd, "!getcar", 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: !getcar [VehicleID]" );
else if ( !IsVehicleExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_GREEN, "Error: Unknown Vehicle" );
else if ( !IsVehicleOwnedShared( strval( tmp ), gPlayers[ playerid ] ) ) SendClientMessage( playerid, COLOR_GREEN, "You do not have the keys for that vehicle." );
else
{
new Float:Angle;
GetPlayerPos( playerid, x, y, z);
GetPlayerFacingAngle( playerid,Angle);
if ( !Angle) SendClientMessage( playerid, COLOR_GREEN, "Error: Invalid vehicle!" );
SetVehiclePos( strval( tmp ),x+3,y+3,z,Angle);
format( szMsg, sizeof( szMsg ), "Getting vehicle:[ %d ]", strval( tmp ) );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
}
return 1;
}[/pawn]
-
Chek that
[pawn]else if ( strcmp( cmd, "!getcar", 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: !getcar [VehicleID]" );
else if ( !IsVehicleExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_GREEN, "Error: Unknown Vehicle" );
else if ( !IsVehicleOwnedShared( strval( tmp ), gPlayers[ playerid ] ) ) SendClientMessage( playerid, COLOR_GREEN, "You do not have the keys for that vehicle." );
else
{
new Float:Angle;
GetPlayerPos( playerid, x, y, z);
GetPlayerFacingAngle( playerid,Angle);
if ( !Angle) SendClientMessage( playerid, COLOR_GREEN, "Error: Invalid vehicle!" );
SetVehiclePos( strval( tmp ),x+3,y+3,z,Angle);
format( szMsg, sizeof( szMsg ), "Getting vehicle:[ %d ]", strval( tmp ) );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
}
return 1;
}[/pawn]
ERROR: You have made !angle, which CAN accept invalid vehicles however, one thing, if the player EXACTLY faces the angel 0.000000 it will say Error: Invalid Vehicle To fix that, just make your own INVAL_VEH system and remove !angle
-
use this
[pawn]else if ( strcmp( cmd, "!getcar", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !getcar [VehicleID]" );
else
{
new Float:Angle;
GetPlayerPos( playerid, x, y, z); GetPlayerFacingAngle( playerid,Angle);
if ( !Angle) SendClientMessage( playerid, COLOR_GREEN, "Error: Invalid vehicle!" );
SetVehiclePos( strval( tmp ),x+3,y+3,z,Angle);
format( szMsg, sizeof( szMsg ), "Spawning vehicle:[ %d ]", strval( tmp ) );
SendClientMessage( playerid, COLOR_GREEN, szMsg ); }
return 1;[/pawn]
-
use this
[pawn]else if ( strcmp( cmd, "!getcar", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !getcar [VehicleID]" );
else
{
new Float:Angle;
GetPlayerPos( playerid, x, y, z); GetPlayerFacingAngle( playerid,Angle);
if ( !Angle) SendClientMessage( playerid, COLOR_GREEN, "Error: Invalid vehicle!" );
SetVehiclePos( strval( tmp ),x+3,y+3,z,Angle);
format( szMsg, sizeof( szMsg ), "Spawning vehicle:[ %d ]", strval( tmp ) );
SendClientMessage( playerid, COLOR_GREEN, szMsg ); }
return 1;[/pawn]
ERROR: You have made !angle, which CAN accept invalid vehicles however, one thing, if the player EXACTLY faces the angel 0.000000 it will say Error: Invalid Vehicle To fix that, just make your own INVAL_VEH system and remove !angle
:'(-[HELP!]<<<<<<<<<<<<<<<<<
-
ERROR: You have made !angle, which CAN accept invalid vehicles however, one thing, if the player EXACTLY faces the angel 0.000000 it will say Error: Invalid Vehicle To fix that, just make your own INVAL_VEH system and remove !angle
Or just if you say, it happens 'By Chance'. Argue can't be made on it. So, let him do whatever he wishes to. If he's still having problem, he will again ask.