new pName[MAX_PLAYER_NAME];
warning 219: local variable "pName" shadows a variable at a preceding level
CMD:get(playerid,params[])
{
new id;
new pName[MAX_PLAYER_NAME];
new pName2[MAX_PLAYER_NAME];
if ( GetPVarInt( playerid, "Level" ) == 0 )return SendClientMessage(playerid, 0xFF0000FF, "Only admin 1-3 can use this command!!");
if(sscanf(params,"us[128]",id)) return SendClientMessage(playerid,COLOR_YELLOW,"Correct Usage:/get [ID]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player ID Doesn't Exist");
{
new Float:X, Float:Y, Float:Z;
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,pName2,sizeof(pName2));
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(id, X, Y, Z);
}
return 1;
}
warning 219: local variable "pName" shadows a variable at a preceding level
pawn Код:
|
error 076: syntax error in the expression, or invalid function call
error 072: "sizeof" operator is invalid on "function" symbols
CMD:get(playerid,params[]) {
new
id,
plname[MAX_PLAYER_NAME],
idname[MAX_PLAYER_NAME];
if ( GetPVarInt( playerid, "Level" ) == 0 )return SendClientMessage(playerid, 0xFF0000FF, "Only admin 1-3 can use this command!!");
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_YELLOW,"Correct Usage:/get [ID]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player ID Doesn't Exist");
{
new Float:X, Float:Y, Float:Z;
//GetPlayerName(playerid,plname,sizeof(plname));
//GetPlayerName(id,idname,sizeof(idname));
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(id, X, Y, Z);
} return 1;
}
PHP код:
|
warning 204: symbol is assigned a value that is never used: "idname"
warning 204: symbol is assigned a value that is never used: "plname"
CMD:get(playerid,params[]) {
new
id;
//plname[MAX_PLAYER_NAME],
//idname[MAX_PLAYER_NAME];
if ( GetPVarInt( playerid, "Level" ) == 0 )return SendClientMessage(playerid, 0xFF0000FF, "Only admin 1-3 can use this command!!");
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_YELLOW,"Correct Usage:/get [ID]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player ID Doesn't Exist");
{
new Float:X, Float:Y, Float:Z;
//GetPlayerName(playerid,plname,sizeof(plname));
//GetPlayerName(id,idname,sizeof(idname));
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(id, X, Y, Z);
} return 1;
}