#1

pawn Код:
dcmd_doorname(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 4)
    {
        SendClientMessage(playerid, COLOR_GRAD2, SERVER_DENIED);
        return 1;
    }

    new string[128], doorid, doorname[128];

    if(sscanf(params, "ds[128]", doorid, doorname)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /doorname [doorid] [name]");

    format(DoorsInfo[doorid][dDescription], 128, "%s", doorname);
    SendClientMessage(playerid, COLOR_WHITE, "You have changed the name of the door!");
    if(IsValidDynamicPickup(DoorsInfo[doorid][dPickupID])) DestroyDynamicPickup(DDoorsInfo[doorid][ddPickupID]);
    if(IsValidDynamic3DTextLabel(DoorsInfo[doorid][dTextID])) DestroyDynamic3DTextLabel(DDoorsInfo[doorid][dTextID]);
    CreateDoor(doorid);
    SaveDoors();

    format(string, sizeof(string), "%s has edited DoorID %d's Name to %s.", GetPlayerNameEx(playerid), doorid, doorname);
    Log("logs/doors.log", string);
    return 1;
}
Hello, I have a Strange error with this, When I test it on my test server, It Says: "USAGE: /doorname [doorid] [name]"

Even if I do something like /doorname 1 Test
Reply
#2

you have 0.3d sscanf ?
Reply
#3

Update to 0.3d and it will work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)