!cash command i dont know .
[pawn]enum pInfo
GotoProp, /// add this
new playergotoloc[MAX_PLAYERS][128]; /// at down
public GotoPropPlayer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[GotoProp]<99)
{
new splitx[4][128];
split( dini_Get( "/Pickups/Pickups.ini", IntToStr(PlayerInfo[GotoProp] ) ), splitx, ' ' );
SetPlayerPos( i, floatstr( splitx[ 1 ] ), floatstr( splitx[ 2 ] ), floatstr( splitx[ 3 ] ), 0, 0 );
PlayerInfo[GotoProp]=99;
}
}
}
}
else if ( strcmp( cmd, "!gotoprop", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_WHITE, "Please log-in to your account." );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_YELLOW, "USAGE: !gotoprop [PropertyID]" );
else if ( !IsPropertyExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_YELLOW, "Error: Unknown Property" );
else if ( !IsPropertyOwner( strval( tmp ), playerid ) ) SendClientMessage( playerid, COLOR_YELLOW, "Error: That property is not owned by you." );
else
{
format( szMsg, sizeof( szMsg ), "*** pm>> Teleporting to Property %s in 5 seconds", PickupInfo[ strval( tmp ) ][ pName ] );
SendClientMessage(playerid,COLOR_GREEN,szMsg);
GameTextForPlayer(playerid,"Teleporting...");
playergotoloc[playerid]=tmp;
PlayerInfo[playerid][GotoProp]=strval( tmp );
SetTimer ("GotoPropPlayer", 5000, 0);
}
return 1;
}
else if ( strcmp( cmd, "!gotoveh", 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: !gotoveh [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
{
PutDirectlyInVehicle(playerid, strval( tmp ) );
}
return 1;
}[/pawn]