10.09.2012, 12:53
pawn Код:
CMD:goto(playerid,params[])
{
if(AccInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid))
{
if(isnull(params)) return
Inter_SendClientMessage(playerid, LIGHTBLUE2, "Usage: /goto [PlayerID]") &&
Inter_SendClientMessage(playerid, orange, "Function: Will Go to specified player");
new player1;
new string[128];
if(!IsNumeric(params))
player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
{
SendCommandToAdmins(playerid,"Goto");
new Float:x, Float:y, Float:z; GetPlayerPos(player1,x,y,z);
SetPlayerInterior(playerid,GetPlayerInterior(player1));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
Streamer_UpdateEx(playerid,x+2,y,z);
if(GetPlayerState(playerid) == 2)
{
SetPlayerPos(GetPlayerVehicleID(playerid),x+3,y,z);
// LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
// SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
}
else SetPlayerPos(playerid,x+2,y,z);
TogglePlayerControllable(playerid,0);
format(string,sizeof(string),"|- You have Teleported to \"%s\" -|", PlayerName2(player1));
TimedTele(playerid, string, x+3, y, z, GetPlayerInterior(player1), GetPlayerVirtualWorld(player1), 1);
return Inter_SendClientMessage(playerid,BlueMsg,string);
}
else return ErrorMessages(playerid, 4);
}
else return ErrorMessages(playerid, 1);
}
pawn Код:
CMD:get(playerid,params[])
{
if(AccInfo[playerid][Level] >= 3|| IsPlayerAdmin(playerid))
{
if(isnull(params)) return
Inter_SendClientMessage(playerid, LIGHTBLUE2, "Usage: /get [PlayerID]") &&
Inter_SendClientMessage(playerid, orange, "Function: Will get to you the specified player");
new player1;
new string[128];
if(!IsNumeric(params))
player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return Inter_SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
{
SendCommandToAdmins(playerid,"Get");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerInterior(player1,GetPlayerInterior(playerid));
SetPlayerVirtualWorld(player1,GetPlayerVirtualWorld(playerid));
Streamer_UpdateEx(player1,x+2,y,z);
if(GetPlayerState(player1) == 2)
{
new VehicleID = GetPlayerVehicleID(player1);
SetVehiclePos(VehicleID,x+3,y,z);
LinkVehicleToInterior(VehicleID,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(GetPlayerVehicleID(player1),GetPlayerVirtualWorld(playerid));
}
else SetPlayerPos(player1,x+2,y,z);
format(string,sizeof(string),"|- You have been Teleported to Administrator \"%s's\" position! -|", pName(playerid));
Inter_SendClientMessage(player1,blue,string);
format(string,sizeof(string),"|- You have Teleported \"%s\" to your Position -|", PlayerName2(player1));
return Inter_SendClientMessage(playerid,BlueMsg,string);
}
else return ErrorMessages(playerid, 4);
}
else return ErrorMessages(playerid, 1);
}
pawn Код:
player1 = ReturnPlayerID(params);
pawn Код:
player1 = ReturnPlayerID(params);
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(904) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(1405) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(1460) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(1513) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(1535) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(1598) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(1826) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(1930) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(2071) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\pawno\include\YSI\y_commands.inc(2365) : warning 219: local variable "hash" shadows a variable at a preceding level
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(35175) : error 017: undefined symbol "ReturnPlayerID"
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(35236) : error 017: undefined symbol "ReturnPlayerID"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.