Код HTML:
CMD:goto(playerid, params[])
{
new Float:X, Float:Y, Float:Z, p2ID; new Str[2500];
//--------------------------------------------------------------------------
new RoError1[150] = "{FF0000}ERROR: {FFFFFF}Nu te poti teleporta la tine!"; new EnError1[150] = "{FF0000}ERROR: {FFFFFF}You can't teleport to yourself!";
new RoError2[150] = "{FF0000}ERROR: {FFFFFF}Nu te poti teleporta la un jucator din Jail!"; new EnError2[150] = "{FF0000}ERROR: {FFFFFF}You can't teleport to a jailed player!";
//--------------------------------------------------------------------------
if(CosminInfo[playerid][Level] >= 3)
{
if(sscanf(params, "d", p2ID)) return SendClientMessage(playerid, COLOR_ULTRARED, "USAGE: {49FFFF}/goto [ID]");
//----------------------------------------------------------------------
if(IsPlayerConnected(p2ID) && p2ID != INVALID_PLAYER_ID)
{
if(p2ID == playerid) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError1 : EnError1);
//------------------------------------------------------------------
if(CosminInfo[p2ID][Jailed] == 1) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError2 : EnError2);
//------------------------------------------------------------------
CMDMessageToAdmins(playerid, "Goto"), GetPlayerPos(p2ID, X, Y, Z), SetPlayerInterior(playerid, GetPlayerInterior(p2ID)), SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(p2ID));
//------------------------------------------------------------------
if(GetPlayerState(playerid) == 2) SetVehiclePos(GetPlayerVehicleID(playerid), X + 3, Y, Z), LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(p2ID)), SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(p2ID));
else return SetPlayerPos(playerid, X + 2, Y, Z);
//------------------------------------------------------------------
format(Str, 128, "%s has teleported to you!", PlayerName(playerid)), SendClientMessage(p2ID, COLOR_YELLOW, Str);
format(Str, 128, "You were teleported to %s!", PlayerName(p2ID)), SendClientMessage(playerid, COLOR_YELLOW, Str);
//------------------------------------------------------------------
return 1;
}
else return SendError2(playerid, "{FFFFFF}Player not connected!", "{FFFFFF}Jucatorul nu este conectat!");
}
else if(CosminInfo[playerid][pVIP] >= 7)
{
new RoError3[150] = "{FF0000}ERROR: {FFFFFF}Nu te poti teleporta la un jucator cu /ignore goto Activat!"; new EnError3[150] = "{FF0000}ERROR: {FFFFFF}You can't teleport to this player because he have /ignore goto ON!";
//----------------------------------------------------------------------
if(sscanf(params, "d", p2ID)) return SendClientMessage(playerid, COLOR_ULTRARED, "USAGE: {49FFFF}/goto [ID]");
//----------------------------------------------------------------------
if(p2ID != INVALID_PLAYER_ID && IsPlayerConnected(p2ID))
{
if(CosminInfo[p2ID][Ignore_Goto] == 0 && CosminInfo[p2ID][Ignore_All] == 0)
{
if(p2ID == playerid) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError1 : EnError1);
//--------------------------------------------------------------
if(CosminInfo[p2ID][Jailed] == 1) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError2 : EnError2);
//------------------------------------------------------------------
CosminInfo[p2ID][Invite][1] = 1, CosminInfo[p2ID][Inviter][1] = playerid;
//--------------------------------------------------------------
format(Str, 400, "%s wants to teleport to your position! Please {0072FF}/accept {FFFF00}or {0072FF}/decline{FFFF00}!", PlayerName(playerid)), SendClientMessage(p2ID, COLOR_YELLOW, Str);
GameTextForPlayer(playerid, "~w~~h~Invite ~g~~h~~h~Sent", 4000, 4);
//--------------------------------------------------------------
return 1;
}
else return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError3 : EnError3);
}
else return SendError2(playerid, "{FFFFFF}Player not connected!", "{FFFFFF}Jucatorul nu este conectat!");
}
else return SendError2(playerid, "{FFFFFF}You must have VIP Super or Admin Level 3 for this command!", "{FFFFFF}Trebuie sa ai VIP Super sau Admin Level 3 pentru aceasta comanda!");
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
CMD:get(playerid, params[])
{
new Float:X, Float:Y, Float:Z, p2ID; new Str[2500];
//--------------------------------------------------------------------------
new RoError1[150] = "{FF0000}ERROR: {FFFFFF}Nu te poti teleporta pe tine la tine!"; new EnError1[150] = "{FF0000}ERROR: {FFFFFF}You can't teleport yourself to you!";
new RoError2[150] = "{FF0000}ERROR: {FFFFFF}Nu poti teleporta un jucator din Jail!"; new EnError2[150] = "{FF0000}ERROR: {FFFFFF}You can't teleport a jailed player!";
//--------------------------------------------------------------------------
if(CosminInfo[playerid][Level] >= 3)
{
if(sscanf(params, "d", p2ID)) return SendClientMessage(playerid, COLOR_ULTRARED, "USAGE: {49FFFF}/get [ID]");
//----------------------------------------------------------------------
if(IsPlayerConnected(p2ID) && p2ID != INVALID_PLAYER_ID)
{
if(p2ID == playerid) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError1 : EnError1);
//------------------------------------------------------------------
if(CosminInfo[p2ID][Jailed] == 1) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError2 : EnError2);
//------------------------------------------------------------------
CMDMessageToAdmins(playerid, "Get"), GetPlayerPos(playerid, X, Y, Z), SetPlayerInterior(p2ID, GetPlayerInterior(playerid)), SetPlayerVirtualWorld(p2ID, GetPlayerVirtualWorld(playerid));
//------------------------------------------------------------------
if(GetPlayerState(p2ID) == 2) SetVehiclePos(GetPlayerVehicleID(p2ID), X + 3, Y, Z), LinkVehicleToInterior(GetPlayerVehicleID(p2ID), GetPlayerInterior(playerid)), SetVehicleVirtualWorld(GetPlayerVehicleID(p2ID), GetPlayerVirtualWorld(playerid));
else return SetPlayerPos(p2ID, X + 2, Y, Z);
//------------------------------------------------------------------
format(Str, 128, "%s has teleported to you!", PlayerName(playerid)), SendClientMessage(p2ID, COLOR_YELLOW, Str);
format(Str, 128, "You were teleported to %s!", PlayerName(p2ID)), SendClientMessage(playerid, COLOR_YELLOW, Str);
//------------------------------------------------------------------
return 1;
}
else return SendError2(playerid, "{FFFFFF}Player not connected!", "{FFFFFF}Jucatorul nu este conectat!");
}
else if(CosminInfo[playerid][pVIP] >= 7)
{
new RoError3[150] = "{FFFFFF}Nu te poti teleporta la un jucator cu /ignore get Activat!"; new EnError3[150] = "{FFFFFF}You can't teleport to this player because he have /ignore get ON!";
//----------------------------------------------------------------------
if(sscanf(params, "d", p2ID)) return SendClientMessage(playerid, COLOR_ULTRARED, "USAGE: {49FFFF}/get [ID]");
//----------------------------------------------------------------------
if(IsPlayerConnected(p2ID) && p2ID != INVALID_PLAYER_ID)
{
if(CosminInfo[p2ID][Ignore_Get] == 0 && CosminInfo[p2ID][Ignore_All] == 0)
{
if(p2ID == playerid) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError1 : EnError1);
//--------------------------------------------------------------
if(CosminInfo[p2ID][Jailed] == 1) return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError2 : EnError2);
//------------------------------------------------------------------
CosminInfo[p2ID][Invite][2] = 1, CosminInfo[p2ID][Inviter][2] = playerid;
//------------------------------------------------------------------
format(Str, 400, "%s wants to teleport you to his position! Please {0072FF}/accept {FFFF00}or {0072FF}/decline{FFFF00}!", PlayerName(playerid)), SendClientMessage(p2ID, COLOR_YELLOW, Str);
GameTextForPlayer(playerid, "~w~~h~Invite ~g~~h~~h~Sent", 4000, 4);
//------------------------------------------------------------------
return 1;
}
else return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError3 : EnError3);
}
else return SendError2(playerid, "{FFFFFF}Player not connected!", "{FFFFFF}Jucatorul nu este conectat!");
}
else return SendError2(playerid, "{FFFFFF}You must have VIP Super or Admin Level 3 for this command!", "{FFFFFF}Trebuie sa ai VIP Super sau Admin Level 3 pentru aceasta comanda!");
}
CMD:accept(playerid)
{
new Float:X, Float:Y, Float:Z; new Str[2500];
//--------------------------------------------------------------------------
new RoError[100] = "{FF0000}ERROR: {FFFFFF}Nu ai ce accepta!"; new EnError[100] = "{FF0000}ERROR: {FFFFFF}You don't have what to accept!";
//--------------------------------------------------------------------------
if(CosminInfo[playerid][Invite][1] == 1)
{
if(!IsPlayerInAnyVehicle(CosminInfo[playerid][Inviter][1]))
{
GetPlayerPos(playerid, X, Y, Z), SetPlayerPos(CosminInfo[playerid][Inviter][1], X+1, Y+1, Z), SetPlayerInterior(CosminInfo[playerid][Inviter][1], GetPlayerInterior(playerid));
//------------------------------------------------------------------
format(Str, 200, "%s has teleported to you!", PlayerName(CosminInfo[playerid][Inviter][1])), SendClientMessage(playerid, COLOR_YELLOW, Str);
format(Str, 200, "You were teleported to %s!", PlayerName(playerid)), SendClientMessage(CosminInfo[playerid][Inviter][1], COLOR_YELLOW, Str);
//------------------------------------------------------------------
CosminInfo[playerid][Inviter][1] = -1;
}
else if(IsPlayerInAnyVehicle(CosminInfo[playerid][Inviter][1]))
{
GetPlayerPos(playerid, X, Y, Z), RemovePlayerFromVehicle(CosminInfo[playerid][Inviter][1]), SetPlayerPos(CosminInfo[playerid][Inviter][1], X+1, Y+1, Z);
//------------------------------------------------------------------
format(Str, 200, "%s has teleported to you!", PlayerName(CosminInfo[playerid][Inviter][1])), SendClientMessage(playerid, COLOR_YELLOW, Str);
format(Str, 200, "You were teleported to %s!", PlayerName(playerid)), SendClientMessage(CosminInfo[playerid][Inviter][1], COLOR_YELLOW, Str);
//------------------------------------------------------------------
CosminInfo[playerid][Inviter][1] = -1;
}
return 1;
}
else if(CosminInfo[playerid][Invite][2] == 1)
{
if(!IsPlayerInAnyVehicle(CosminInfo[playerid][Inviter][2]))
{
GetPlayerPos(CosminInfo[playerid][Inviter][2], X, Y, Z), SetPlayerPos(playerid, X+1, Y+1, Z), SetPlayerInterior(playerid, GetPlayerInterior(CosminInfo[playerid][Inviter][2]));
//------------------------------------------------------------------
format(Str, 200, "%s was teleported to you!", PlayerName(playerid)), SendClientMessage(CosminInfo[playerid][Inviter][2], COLOR_YELLOW, Str);
format(Str, 200, "You were teleported to %s!", PlayerName(CosminInfo[playerid][Inviter][2])), SendClientMessage(playerid, COLOR_YELLOW, Str);
//------------------------------------------------------------------
CosminInfo[playerid][Inviter][2] = -1;
}
else if(IsPlayerInAnyVehicle(CosminInfo[playerid][Inviter][2]))
{
GetPlayerPos(CosminInfo[playerid][Inviter][2], X, Y, Z), SetPlayerPos(playerid, X+1, Y+1, Z);
//------------------------------------------------------------------
format(Str, 200, "%s was teleported to you!", PlayerName(playerid)), SendClientMessage(CosminInfo[playerid][Inviter][2], COLOR_YELLOW, Str);
format(Str, 200, "You were teleported to %s!", PlayerName(CosminInfo[playerid][Inviter][2])), SendClientMessage(playerid, COLOR_YELLOW, Str);
//------------------------------------------------------------------
CosminInfo[playerid][Inviter][2] = -1;
}
return 1;
}
else return SendClientMessage(playerid, COLOR_ULTRARED, (CosminInfo[playerid][Language] == 1) ? RoError : EnError);
}