dcmd_goto(playerid, params[])
{
if (strlen(params))
{
id = strval(params);
if (IsPlayerConnected(id))
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "Command working Ok?");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are not an Administrator");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
}
return 1;
}
C:\Users\Torran\Documents\Server\gamemodes\sftdm.pwn(380) : error 017: undefined symbol "id" C:\Users\Torran\Documents\Server\gamemodes\sftdm.pwn(381) : error 017: undefined symbol "id" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
dcmd_goto(playerid, params[])
{
if (strlen(params))
{
new id = strval(params);
if (IsPlayerConnected(id))
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "Command working Ok?");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are not an Administrator");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
}
return 1;
}
Originally Posted by JoeDaDude
Simple problem but im not all that used to dcmd so i dont know what to do exactly
|
Originally Posted by JoeDaDude
Код:
C:\Users\Torran\Documents\Server\gamemodes\sftdm.pwn(380) : error 017: undefined symbol "id" C:\Users\Torran\Documents\Server\gamemodes\sftdm.pwn(381) : error 017: undefined symbol "id" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
dcmd_goto(playerid, params[])
{
new id;
if (strlen(params))
{
id = strval(params);
if (IsPlayerConnected(id))
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "Command working Ok?");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are not an Administrator");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
}
return 1;
}
dcmd_goto(playerid, params[])
{
if (strlen(params))
{
new id = strval(params);
if (IsPlayerConnected(id))
{
if(IsPlayerAdmin(playerid))
{
new
Float:pPos[ 3 ];
GetPlayerPos(id, pPos[ 0 ], pPos[ 1 ], pPos[ 2 ] );
SetPlayerPos( playerid, pPos[ 0 ], pPos[ 1 ], pPos[ 2 ] );
SetPlayerInterior(playerid, GetPlayerInterior(id));
SendClientMessage(playerid, COLOR_WHITE, "You've been teleported to the player!");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are not an Administrator");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found!");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/goto <playerid>\"");
}
return 1;
}
dcmd_goto(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
if (sscanf(params,"u",id))
{
SendClientMessage(playerid,COLOR,"[USAGE] /goto [ID]");
}
else if(!IsPlayerConnected(id))
{
SendClientMessage(playerid,COLOR,"[ERROR] Player is not connected");
}
else if(playerid == id) {
SendClientMessage(playerid,COLOR,"[ERROR] You can't teleport yourself.");
}
else
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(id,X,Y,Z);
SetPlayerPos(playerid,X,Y,Z);
}
}
else
{
SendClientMessage(playerid,COLOR,"[ERROR] You are not logged in at rcon.");
}
return 1;
}