Problem with sscanf
#1

now i have move my hoster from home host to volt-host now i get problem had problems with some command such as this

yes have sscanf plugin

help me get + rep

pawn Код:
COMMAND:gethere(playerid, params[])
{
    new iPlayerID; // The player we want to teleport to us
    new Float:posX, Float:posY, Float:posZ;
   
    ///////////////////////////////////////////
    ///////////ADMINCHECK/////////////////////
    if(!AdminCheck(playerid, ADMINLEVEL_MODERATOR))
        return 1;
    /////////////////////////////////////////
    /////////////////////////////////////////
    if(sscanf(params, "u", iPlayerID)) // If the player hasn't submitted the parameter "user"
    {
        return SendClientMessage(playerid,COLOR_GREY,"Usage: /gethere [PlayerID/PartOfName]");
    }

    if(IsPlayerInAnyVehicle(iPlayerID) && GetPlayerState(iPlayerID) == PLAYER_STATE_DRIVER) // Is the player currently inside a vehicle?
    {
        if(GetPlayerInterior(playerid) != 0) // If so, is the admin teleporting him inside an interior?
        {
            return SendClientMessage(playerid,COLOR_GREY,"You can't teleport a vehicle into an interior!");
        }

        ////////////////////////////////////////VARIABLES////////////////////////////////////
        new szMessage[23+1+MAX_PLAYER_NAME]; // String to contain the success-message
        new iVehicleID = GetPlayerVehicleID(iPlayerID);
        /////////////////////////////////////////////////////////////////////////////////////

        GetPlayerPos(playerid, posX, posY, posZ); // Get our players position
        SetVehiclePos(iVehicleID, posX+5, posY, posZ); // Teleport the vehicle
        SetPlayerInterior(iPlayerID, GetPlayerInterior(playerid)); // Just in case something goes wrong
        SetPlayerVirtualWorld(iPlayerID, GetPlayerVirtualWorld(playerid)); // Set the players virtual world
        SetVehicleVirtualWorld(iVehicleID, GetPlayerVirtualWorld(playerid)); // Set the vehicles virtual world

        format(szMessage, 23+1+MAX_PLAYER_NAME,"You teleported %s to you!", ReturnPlayerName(iPlayerID));
        SendClientMessage(playerid,COLOR_WHITE,szMessage);
    }
    else
    {
        new szMessage[23+1+MAX_PLAYER_NAME]; // String to contain the success-message

        GetPlayerPos(playerid, posX, posY, posZ); // Get our players position
        SetPlayerPos(iPlayerID, posX, posY, posZ);
        SetPlayerInterior(iPlayerID, GetPlayerInterior(playerid));
        SetPlayerVirtualWorld(iPlayerID, GetPlayerVirtualWorld(playerid));

        format(szMessage, 23+1+MAX_PLAYER_NAME,"You teleported %s to you!", ReturnPlayerName(iPlayerID));
        SendClientMessage(playerid,COLOR_WHITE,szMessage);
    }
    return 1;
}
but this command work but i think this are same command system

pawn Код:
COMMAND:commands(playerid, params[])
{
    SendClientMessage(playerid,COLOR_WHITE,"- http://www.ibp-rp.com [Command List]");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /stats /time /admins /changepass /spawnpoint /charity /anim");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /dropgun /pgun  /showid /id /accept /pay /re(port) /toggle");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /engine /refuel /eject /tie /untie /frisk /searchwallet ");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /bail /dice /coin /detonatebomb /seatbelt /clearanims");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /blindfold /unblindfold /lock /askq /calllist /trunk");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /inventory /id /lock /vehicle  /give /setstat /testers");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /buy /buygun /buydrink /askq /eatfood /drug /house /v");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /housecmds /businesscmds /jobcmds /chatcmds /notecmds");
    SendClientMessage(playerid, COLOR_GRAD2, "[General] /bankcmds /phonecmds /quitjob");
   
    switch(PlayerInfo[playerid][pFaction])
    {
        case 1:
        {
            return SendClientMessage(playerid,COLOR_GRAD2,"[Police] /p(olice)cmds");
        }
        case 2:
        {
            return SendClientMessage(playerid, COLOR_GRAD2, "[LS-EMS] /mcmds");
        }
        case 3:
        {
            return SendClientMessage(playerid, COLOR_GRAD2, "[Sheriff] /pcmds");
        }
        case 4:
        {
            return SendClientMessage(playerid, COLOR_GRAD2, "[SAN News] /newscmds");
        }
    }
   
    if(PlayerInfo[playerid][pRank] == 1)
    {
        return SendClientMessage(playerid, COLOR_GRAD2, "[Leader] /leadercmds");
    }
   
    if(PlayerInfo[playerid][pAdministrator] >= 1)
    {
        return SendClientMessage(playerid, COLOR_GRAD2, "[Admin] /acmds");
    }
   
    return 1;
}
Reply
#2

I can see that the second command does not use scanff. Volt host uses linux, so you put the .so plugin and not the dll right?
Reply
#3

What GM are you using?
Reply
#4

Volt-Host uses One Click Mod Installer, use it to install sscanf, if you upload yours, it won't work. After that, open your server.cfg and do the following

plugins sscanf2.so
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)