14.01.2012, 13:12
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;
}
Even if I do something like /doorname 1 Test