[12:58:26] sscanf warning: Format specifier does not match parameter count.
CMD:gotoid(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_ERROR,"SERVER: Nemozes koristiti tu komandu jer nisi admin lvl 2! "); new targetid, string[128]; if(sscanf(params, "uz[6]", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "POMOC: /goto [PlayerID/PartOfName]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_ERROR, "SERVER: Taj igrac nije online!"); else { new pName[24]; GetPlayerName(targetid,pName,128); format(string, sizeof(string), "SERVER: Teleportiro si se kod [%d]%s.",targetid, pName); SendClientMessage(playerid,COLOR_RED,string); SetPlayerInterior(playerid,GetPlayerInterior(targetid)); new Float:TPX, Float:TPY, Float:TPZ; GetPlayerPos(targetid, TPX, TPY, TPZ); SetPlayerPos(playerid, TPX, TPY, TPZ+1); } return 1; }
CMD:gotoid(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_ERROR,"SERVER: Nemozes koristiti tu komandu jer nisi admin lvl 2! ");
new targetid, string[128];
if(sscanf(params, "uz[6]", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "POMOC: /goto [PlayerID/PartOfName]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_ERROR, "SERVER: Taj igrac nije online!");
{
new pName[24];
GetPlayerName(targetid,pName,128);
format(string, sizeof(string), "SERVER: Teleportiro si se kod [%d]%s.",targetid, pName);
SendClientMessage(playerid,COLOR_RED,string);
SetPlayerInterior(playerid,GetPlayerInterior(targetid));
new Float:TPX, Float:TPY, Float:TPZ;
GetPlayerPos(targetid, TPX, TPY, TPZ);
SetPlayerPos(playerid, TPX, TPY, TPZ+1);
}
return 1;
}
pawn Код:
|
CMD:gotoid(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_ERROR,"SERVER: Nemozes koristiti tu komandu jer nisi admin lvl 2! ");
new targetid, string[128];
if(sscanf(params, "r", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "POMOC: /goto [PlayerID/PartOfName]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_ERROR, "SERVER: Taj igrac nije online!");
{
new pName[24];
GetPlayerName(targetid,pName,128);
format(string, sizeof(string), "SERVER: Teleportiro si se kod [%d]%s.",targetid, pName);
SendClientMessage(playerid,COLOR_RED,string);
SetPlayerInterior(playerid,GetPlayerInterior(targetid));
new Float:TPX, Float:TPY, Float:TPZ;
GetPlayerPos(targetid, TPX, TPY, TPZ);
SetPlayerPos(playerid, TPX, TPY, TPZ+1);
}
return 1;
}
if(sscanf(params, "uz[6]", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "POMOC: /goto [PlayerID/PartOfName]");
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "POMOC: /goto [PlayerID/PartOfName]");