COMMAND:espiar(playerid, params[]) { // Setup local variables new OtherPlayer, Name[24], Msg[128]; // Send the command to all admins so they can see it SendAdminText(playerid, "/espiar", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 1 if (APlayerData[playerid][PlayerLevel] >= 1) { if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /espiar [id]"); else { // Check if that other player is online if (IsPlayerConnected(OtherPlayer)) { // Get the player's name GetPlayerName(OtherPlayer, Name, sizeof(Name)); // Turn spectating on TogglePlayerSpectating(playerid, 1); // Check if the other player is driving a vehicle if (GetPlayerVehicleSeat(OtherPlayer) == -1) { // The other player is on foot, so spectate him PlayerSpectatePlayer(playerid, OtherPlayer); SetPlayerInterior(playerid, GetPlayerInterior(OtherPlayer)); APlayerData[playerid][SpectateID] = OtherPlayer; APlayerData[playerid][SpectateType] = ADMIN_SPEC_TYPE_PLAYER; } else { // The other player is in a vehicle, so spectate the vehicle PlayerSpectateVehicle(playerid, GetPlayerVehicleID(OtherPlayer)); APlayerData[playerid][SpectateID] = OtherPlayer; APlayerData[playerid][SpectateVehicle] = GetPlayerVehicleID(OtherPlayer); APlayerData[playerid][SpectateType] = ADMIN_SPEC_TYPE_VEHICLE; } format(Msg, 128, "{00FF00}[MDC] Vocк estб espiando {FFFF00}%s.", Name); SendClientMessage(playerid, 0xFFFFFFFF, Msg); } else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[MDC] Esse jogador nгo estб online."); } } else return 0; } else return 0; // Let the server know that this was a valid command return 1; } |
COMMAND:ir(playerid, params[]) { // Setup local variables new OtherPlayer, Float, Float:y, Float:z, PortMsg[128], IntID, WorldID; // Send the command to all admins so they can see it SendAdminText(playerid, "/ir", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player's admin-level is at least 1 if (APlayerData[playerid][PlayerLevel] >= 1) { // Check if the player has a wanted level of less than 3 if (GetPlayerWantedLevel(playerid) < 3) { // Check if the player is not jailed if (APlayerData[playerid][PlayerJailed] == 0) { if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]"); else { // Check if that other player is online if (IsPlayerConnected(OtherPlayer)) { // Get the location of the other player GetPlayerPos(OtherPlayer, x, y, z); IntID = GetPlayerInterior(OtherPlayer); WorldID = GetPlayerVirtualWorld(OtherPlayer); // Port the player to the given location SetPlayerVirtualWorld(playerid, WorldID); SetPlayerInterior(playerid, IntID); SetPlayerPos(playerid, x, y, z + 3.0); // Let the player know about it format(PortMsg, 128, "[MDC] A posiзгo do jogador й: %4.2f, %4.2f, %4.2f", x, y, z + 3.0); SendClientMessage(playerid, 0x00FF00FF, PortMsg); } else SendClientMessage(playerid, 0xFF0000FF, "[MDC] Esse jogador nгo estб online."); } } else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[MDC] Vocк nгo pode usar o comando /ir quando preso."); } else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[MDC] Vocк nao pode usar o comando /ir quando procurado."); } else return 0; } else return 0; // Let the server know that this was a valid command return 1; } |
sscanf(params, "u", OtherPlayer)... |
sscanf(params, "d", OtherPlayer)
COMMAND:espiar(playerid, params[])
{
new Name[MAX_PLAYER_NAME], Msg[128];
SendAdminText(playerid, "/espiar", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "u", params))
return SendClientMessage(playerid, 0xFF0000AA, "Use: /espiar [id]");
if (IsPlayerConnected(params))
{
GetPlayerName(params, Name, MAX_PLAYER_NAME);
TogglePlayerSpectating(playerid, 1);
if (GetPlayerVehicleSeat(params) == -1)
{
PlayerSpectatePlayer(playerid, params);
SetPlayerInterior(playerid, GetPlayerInterior(params));
APlayerData[playerid][SpectateID] = params;
APlayerData[playerid][SpectateType] = ADMIN_SPEC_TYPE_PLAYER;
}
else
{
// The other player is in a vehicle, so spectate the vehicle
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(params));
APlayerData[playerid][SpectateID] = params;
APlayerData[playerid][SpectateVehicle] = GetPlayerVehicleID(params);
APlayerData[playerid][SpectateType] = ADMIN_SPEC_TYPE_VEHICLE;
}
format(Msg, 128, "{00FF00}[MDC] Vocк estб espiando {FFFF00}%s.", Name);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[MDC] Esse jogador nгo estб online.");
}
}
// Let the server know that this was a valid command
return 1;
}
C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3127) : error 035: argument type mismatch (argument 1) C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3129) : error 035: argument type mismatch (argument 1) C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3132) : error 035: argument type mismatch (argument 1) C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3134) : error 035: argument type mismatch (argument 2) C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3135) : error 035: argument type mismatch (argument 1) C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3136) : error 006: must be assigned to an array C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3142) : error 035: argument type mismatch (argument 1) C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3143) : error 006: must be assigned to an array C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\pawno\include\PPC_PlayerCommands.inc( 3144) : error 035: argument type mismatch (argument 1) C:\Users\WicKxGaMer\Desktop\[GM] Mundo do Caminhoneiro\gamemodes\MDC.pwn(1612) : warning 203: symbol is never used: "Dialog_Neon" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors. |