rep again :) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: rep again :) (
/showthread.php?tid=376473)
rep again :) -
Windrush - 10.09.2012
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);
}
Error line
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.
Re: rep again :) -
Lutz - 10.09.2012
Hmm, do you have "new hash;" (or something along those lines) anywhere in your script? And is your ReturnPlayerID a custom function?
Re: rep again :) -
Windrush - 10.09.2012
i pot a new hash;
but it said already defined
mean i have already
Re: rep again :) -
Lutz - 10.09.2012
If you must have the "new hash;" try renaming it to something like "new hash1;" (you will also need to rename it anywhere you used it in your script; ctrl+h for 'find and replace').
Re: rep again :) -
Windrush - 10.09.2012
Sorry i Delete The Command now