Params keep showing without working [sscanf]
#3

But the telename is not the playername it's a teleport name try it like this.

pawn Код:
dcmd_createtele(playerid, params[])
{
    if( PlayerInfo[playerid][pAdmin] >= 1339)
    {
        new name[32], string[128];
        new idx = GetFreeTeleSlot();
        if(isnull(params)) SendClientMessage(playerid, X11_GREEN, "USAGE: /createtele [name]");
        else
        {
            sscanf(params, "s[32]", name);
            GetPlayerPos(playerid, TeleInfo[idx][tX], TeleInfo[idx][tY], TeleInfo[idx][tZ]);
            GetPlayerFacingAngle(playerid, TeleInfo[idx][tA]);
            TeleInfo[idx][tVW] = GetPlayerVirtualWorld(playerid);
            TeleInfo[idx][tInt] = GetPlayerInterior(playerid);
            strmid(TeleInfo[idx][tName], name, 0, strlen(name), 32);
            format(string, sizeof(string), "Teleport Created: [Name: %s | ID: %d | X: %.02f | Y: %.02f | Z: %.02f | A: %.02f | VW: %d | Int: %d]",
            TeleInfo[idx][tName], idx, TeleInfo[idx][tX], TeleInfo[idx][tY], TeleInfo[idx][tZ], TeleInfo[idx][tA], TeleInfo[idx][tVW], TeleInfo[idx][tInt]);
            SendClientMessage(playerid, X11_ORANGE, string);
            SaveTeleports();
        }
    }
    else SendClientMessage(playerid, X11_RED, "ERROR: You are not authorized to use this command.");
   return 1;
}
Reply


Messages In This Thread
Params keep showing without working [sscanf] - by Black Axe - 02.05.2013, 14:49
Re: Params keep showing without working [sscanf] - by Yashas - 02.05.2013, 14:52
Re: Params keep showing without working [sscanf] - by Pottus - 02.05.2013, 14:57
Re: Params keep showing without working [sscanf] - by Black Axe - 02.05.2013, 15:06

Forum Jump:


Users browsing this thread: 2 Guest(s)